Skip to content

Commit

Permalink
Format auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Clark committed Dec 6, 2019
1 parent 8940139 commit 4b6ff8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ async function write(directory: string, settings: string) {
try {
return fs.writeFileSync(location, settings, options);
} catch (e) {
if (e.code == "EEXIST") {
if (e.code == 'EEXIST') {
console.warn(`overwriting existing file ${location}`);
return fs.writeFileSync(location, settings, {encoding: 'utf-8', flag: 'w'});
return fs.writeFileSync(location, settings, {
encoding: 'utf-8',
flag: 'w'
});
}
throw e;
}
Expand Down

0 comments on commit 4b6ff8c

Please sign in to comment.