Skip to content

Commit 169f156

Browse files
fix(init): incorrect target dir argument (#3415)
Fixes #3413
1 parent 8a996a4 commit 169f156

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/init/src/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export async function initProject(
105105
console.log(` version ${colors.rgb8(freshVersion, 4)}`);
106106
console.log();
107107

108-
let unresolvedDirectory = Deno.args[0];
108+
let unresolvedDirectory;
109109
if (input.length !== 1) {
110110
const userInput = prompt(
111111
"Project Name:",
@@ -116,6 +116,8 @@ export async function initProject(
116116
}
117117

118118
unresolvedDirectory = userInput;
119+
} else {
120+
unresolvedDirectory = String(input[0]);
119121
}
120122

121123
const projectDir = path.resolve(cwd, unresolvedDirectory);

0 commit comments

Comments
 (0)