We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d35195f commit adb744aCopy full SHA for adb744a
src/utils.ts
@@ -1,4 +1,4 @@
1
-import fs from 'fs'
+import fs from 'fs-extra'
2
import {homedir, tmpdir} from 'os'
3
import * as path from 'path'
4
@@ -10,7 +10,11 @@ export function getConfigFilePath() {
10
configDir = path.join(homedir(), '.hackmd')
11
}
12
13
- return path.join(configDir, 'config.json')
+ const configPath = path.join(configDir, 'config.json')
14
+
15
+ fs.ensureFileSync(configPath)
16
17
+ return configPath
18
19
20
export function setAccessTokenConfig(token: string) {
0 commit comments