Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit 24ad4f1

Browse files
committed
fir scandir error
1 parent 8fe4b3a commit 24ad4f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/questions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ export async function promptLocation() {
3131
if (dir === ".") return true;
3232

3333
const validation = existsSync(dir);
34+
if (!validation) return true;
35+
3436
const isEmpty = readdirSync(dir).length === 0;
35-
if (!validation || isEmpty) return true;
37+
if (isEmpty) return true;
3638
return "That directory already exists.";
3739
},
3840
});

0 commit comments

Comments
 (0)