fix(init): incorrect target dir argument (#3415)

Fixes https://github.com/denoland/fresh/issues/3413
This commit is contained in:
Marvin Hagemeister
2025-09-12 15:37:06 +02:00
committed by GitHub
parent 8a996a428a
commit 169f156f78
+3 -1
View File
@@ -105,7 +105,7 @@ export async function initProject(
console.log(` version ${colors.rgb8(freshVersion, 4)}`); console.log(` version ${colors.rgb8(freshVersion, 4)}`);
console.log(); console.log();
let unresolvedDirectory = Deno.args[0]; let unresolvedDirectory;
if (input.length !== 1) { if (input.length !== 1) {
const userInput = prompt( const userInput = prompt(
"Project Name:", "Project Name:",
@@ -116,6 +116,8 @@ export async function initProject(
} }
unresolvedDirectory = userInput; unresolvedDirectory = userInput;
} else {
unresolvedDirectory = String(input[0]);
} }
const projectDir = path.resolve(cwd, unresolvedDirectory); const projectDir = path.resolve(cwd, unresolvedDirectory);