mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Do not crash if tmp dir delete fails on win
This commit is contained in:
parent
98ce05b6a8
commit
fd6ca1a33b
@ -75,7 +75,9 @@ module.exports = class ServerlessSpec extends Spec {
|
||||
try {
|
||||
removeSync(tmpDirCommonPath);
|
||||
} catch (error) {
|
||||
if (error.code !== 'ENOENT') throw error;
|
||||
if (error.code !== 'ENOENT' || (error.code !== 'EPERM' || process.platform !== 'win32')) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (process.version[1] < 8) return; // Async leaks detector is not reliable in Node.js v6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user