From 12896dfb0f4c3c1a4c5d7186e5f2b6dace62da03 Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Thu, 5 Dec 2019 00:41:50 -0500 Subject: [PATCH] logging options --- dist/index.js | Bin 157976 -> 158003 bytes src/auth.ts | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 32058f3255c74a0535b1ad22a57783ccb089023a..22c99c9fca81ef1365e04872a6ac91b43efd9d4d 100644 GIT binary patch delta 110 zcmbPniF5NM&W0AoEliF=;tJ)NB^e6&1tppJdBqAU)lk-S2O%c;>1jetvD3c_F_nwy z>no(BrX`l#Pliu_V7ECPD?+7soPOs)?;@N&l In8_^^08eNnivR!s delta 80 zcmV-W0I&bE(g~Q-34nwFv;sjAmst`59+%)w0tc6Q69OfdoDu>!2q9%IV{c?-DVGs6 m0v7^hJD0-}0*IF&&jARRdJ_Utlke*Wmk;&<2Dj}K0!CFKy&6XV diff --git a/src/auth.ts b/src/auth.ts index 875c6b4..2e83ede 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -46,9 +46,9 @@ export function generate(id: string, username: string, password: string) { async function write(directory: string, settings: string) { const options = {encoding: 'utf-8', flag: 'wx'}; // 'wx': Like 'w' but fails if path exists const location = path.join(directory, SETTINGS_FILE); - console.log(`writing ${location}`); + console.log(`writing ${location} with options ${options}`); try { - return fs.writeFileSync(location, settings, options); + fs.writeFileSync(location, settings, options); } catch (e) { if (e.code == fs.constants.O_EXCL) { console.log(`overwriting existing file ${location}`);