Skip to content

Commit

Permalink
Fix falsy warning when using the --current flag
Browse files Browse the repository at this point in the history
  • Loading branch information
OrJDev committed Feb 10, 2023
1 parent 0162fc0 commit 0dfbc5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-tomatoes-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-jd-app": patch
---

Fix falsy warning when using the --current flag
2 changes: 1 addition & 1 deletion src/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function initApp(args: string[]): Promise<IAppCtx> {
const useCurrentDir = args.includes("current");
const userDir = path.resolve(process.cwd(), useCurrentDir ? "" : appName);
const exists = await existsOrCreate(userDir);
if (exists) {
if (exists && !useCurrentDir) {
if (
(
await inquirer.prompt<{ overWrite: boolean }>({
Expand Down

0 comments on commit 0dfbc5f

Please sign in to comment.