Skip to content

Commit 674a66b

Browse files
committed
createWriteStream: Ignore error in fs.unlinkSync
1 parent c3bbe0a commit 674a66b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/fs/src/NodeFS.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ export class NodeFS implements FileSystem {
112112

113113
writeStream.once('error', () => {
114114
failed = true;
115-
fs.unlinkSync(tmpFilePath);
115+
try {
116+
fs.unlinkSync(tmpFilePath);
117+
} catch (e) {
118+
// ignore error
119+
}
116120
});
117121

118122
return writeStream;

0 commit comments

Comments
 (0)