fix(init): incorrect target dir argument (#3415)
Fixes https://github.com/denoland/fresh/issues/3413
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user