mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-27 23:58:38 -06:00
Add exists check before unlink
This commit is contained in:
parent
bc3268b654
commit
e705c15c14
@ -80,7 +80,7 @@ class FailedTestsReporter extends Mocha.reporters.Base {
|
||||
const failed = Array.from(failingTests).join(os.EOL);
|
||||
fs.writeFile(file, failed, "utf8", done);
|
||||
}
|
||||
else if (!keepFailed) {
|
||||
else if (!keepFailed && fs.existsSync(file)) {
|
||||
fs.unlink(file, done);
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user