We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0d56de commit 4f399daCopy full SHA for 4f399da
src/lib/initialization.ts
@@ -1,5 +1,5 @@
1
import consola from "consola"
2
-import fs from "node:fs"
+import fs from "node:fs/promises"
3
import { FetchError } from "ofetch"
4
5
import { APP_CONFIG } from "~/lib/config"
@@ -22,10 +22,10 @@ interface InitStep {
22
const initSteps: Array<InitStep> = [
23
{
24
name: "App directory",
25
- run: () => {
26
- if (!fs.existsSync(PATHS.APP_DIR)) {
27
- fs.mkdirSync(PATHS.APP_DIR, { recursive: true })
28
- }
+ run: async () => {
+ await fs.mkdir(PATHS.APP_DIR, { recursive: true })
+ const handle = await fs.open(PATHS.GITHUB_TOKEN_PATH, "a")
+ await handle.close()
29
},
30
31
0 commit comments