Use fs.unlinkSync instead of fs.unlink when removing files in the font tests

This commit is contained in:
Tim van der Meij 2018-06-03 22:17:05 +02:00
parent 8ce24744f2
commit 90750d624b
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -69,7 +69,7 @@ exports.translateFont = function translateFont(content, registerOnCancel,
fs.writeFileSync(fontPath, buffer);
runTtx(ttxResourcesHome, fontPath, registerOnCancel, function (err) {
fs.unlink(fontPath);
fs.unlinkSync(fontPath);
if (err) {
console.error(err);
callback(err);
@ -77,7 +77,7 @@ exports.translateFont = function translateFont(content, registerOnCancel,
callback('Output was not generated');
} else {
callback(null, fs.readFileSync(resultPath));
fs.unlink(resultPath);
fs.unlinkSync(resultPath);
}
});
};