We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adb744a commit 42c6484Copy full SHA for 42c6484
src/utils.ts
@@ -12,7 +12,10 @@ export function getConfigFilePath() {
12
13
const configPath = path.join(configDir, 'config.json')
14
15
- fs.ensureFileSync(configPath)
+ if (!fs.existsSync(configDir)) {
16
+ fs.ensureFileSync(configPath)
17
+ fs.writeFileSync(configPath, JSON.stringify({}))
18
+ }
19
20
return configPath
21
}
@@ -30,9 +33,8 @@ export function setAccessTokenConfig(token: string) {
30
33
31
34
export function safeStdinRead() {
32
35
let result
- const STDIN_FD = 0
36
try {
- result = fs.readFileSync(STDIN_FD).toString()
37
+ result = fs.readFileSync(process.stdin.fd).toString()
38
} catch {}
39
return result
40
0 commit comments