We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d32a4d1 commit b3acfe1Copy full SHA for b3acfe1
src/react/utils/token/to-cli.js
@@ -7,14 +7,6 @@ export default async (mail, token) => {
7
const fs = remote.require('fs-promise')
8
9
const filePath = path.join(os.homedir(), '.now.json')
10
-
11
- try {
12
- await fs.ensureFile(filePath)
13
- } catch (err) {
14
- console.error(err)
15
- return
16
- }
17
18
let currentContent = {}
19
20
try {
@@ -24,9 +16,11 @@ export default async (mail, token) => {
24
currentContent.email = mail
25
currentContent.token = token
26
+ const newContent = JSON.stringify(currentContent, null, 2)
+
27
21
28
- await fs.writeJSON(filePath, currentContent)
22
+ await fs.writeFile(filePath, newContent)
29
23
} catch (err) {
30
- console.error('Could not overwrite .now.json')
+ console.error(err)
31
}
32
0 commit comments