diff --git a/dist/index.js b/dist/index.js index 0ff2524..92274cd 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/src/auth.ts b/src/auth.ts index f716261..6068341 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -50,12 +50,11 @@ async function write(directory: string, settings: string) { try { return fs.writeFileSync(location, settings, options); } catch (e) { - if (e.code == fs.constants.O_EXCL) { + if (e.code == "EEXIST") { console.log(`overwriting existing file ${location}`); // default flag is 'w' return fs.writeFileSync(location, settings, {encoding: 'utf-8'}); } - console.log(`error ${JSON.stringify(e)} and O_EXCL ${fs.constants.O_EXCL}`); throw e; } }