fix: workaround misleading ENOENT error (#11160)
This commit is contained in:
parent
223cee7246
commit
a583eab41f
@ -43,6 +43,9 @@ export function save() {
|
|||||||
fs.writeFileSync(FILENAME, serialised);
|
fs.writeFileSync(FILENAME, serialised);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
switch (e.code) {
|
switch (e.code) {
|
||||||
|
// workaround https://github.com/nodejs/node/issues/31481
|
||||||
|
// todo: remove the ENOENT error check when we drop node.js 13 support
|
||||||
|
case "ENOENT":
|
||||||
case "EACCES":
|
case "EACCES":
|
||||||
case "EPERM":
|
case "EPERM":
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user