init
This commit is contained in:
19
node_modules/rimraf/dist/esm/ignore-enoent.js
generated
vendored
Normal file
19
node_modules/rimraf/dist/esm/ignore-enoent.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { errorCode } from './error.js';
|
||||
export const ignoreENOENT = async (p, rethrow) => p.catch(er => {
|
||||
if (errorCode(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
});
|
||||
export const ignoreENOENTSync = (fn, rethrow) => {
|
||||
try {
|
||||
return fn();
|
||||
}
|
||||
catch (er) {
|
||||
if (errorCode(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=ignore-enoent.js.map
|
||||
Reference in New Issue
Block a user