From 96236d7072cf35fe951ee34da7850be147cd261d Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Thu, 5 Dec 2019 00:43:41 -0500 Subject: [PATCH] return but shoudl still fail --- dist/index.js | 2 +- src/auth.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 22c99c9..3f1a2e3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4167,7 +4167,7 @@ function write(directory, settings) { const location = path.join(directory, exports.SETTINGS_FILE); console.log(`writing ${location} with options ${options}`); try { - fs.writeFileSync(location, settings, options); + return fs.writeFileSync(location, settings, options); } catch (e) { if (e.code == fs.constants.O_EXCL) { diff --git a/src/auth.ts b/src/auth.ts index 2e83ede..f0d1197 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -48,7 +48,7 @@ async function write(directory: string, settings: string) { const location = path.join(directory, SETTINGS_FILE); console.log(`writing ${location} with options ${options}`); try { - fs.writeFileSync(location, settings, options); + return fs.writeFileSync(location, settings, options); } catch (e) { if (e.code == fs.constants.O_EXCL) { console.log(`overwriting existing file ${location}`);