Merge pull request #9774 from timvandermeij/unlink

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:27:47 +02:00 committed by GitHub
commit 5053d02ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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