Skip to content

Commit

Permalink
Merge pull request mozilla#9774 from timvandermeij/unlink
Browse files Browse the repository at this point in the history
Use `fs.unlinkSync` instead of `fs.unlink` when removing files in the font tests
  • Loading branch information
timvandermeij authored Jun 3, 2018
2 parents 9d86924 + 0f42ea4 commit 6cc6541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/font/ttxdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ 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);
} else if (!fs.existsSync(resultPath)) {
callback('Output was not generated');
} else {
callback(null, fs.readFileSync(resultPath));
fs.unlink(resultPath);
fs.unlinkSync(resultPath);
}
});
};

0 comments on commit 6cc6541

Please sign in to comment.