diff --git a/packages/nuxi/src/commands/init.ts b/packages/nuxi/src/commands/init.ts index 9532eca04..fbc3e195a 100644 --- a/packages/nuxi/src/commands/init.ts +++ b/packages/nuxi/src/commands/init.ts @@ -10,7 +10,7 @@ import { colors } from 'consola/utils' import { downloadTemplate, startShell } from 'giget' import { installDependencies } from 'nypm' import { $fetch } from 'ofetch' -import { join, relative, resolve } from 'pathe' +import { relative, resolve } from 'pathe' import { hasTTY } from 'std-env' import { x } from 'tinyexec' @@ -357,7 +357,7 @@ export default defineCommand({ const args: string[] = [ 'add', ...modulesToAdd, - `--cwd=${join(ctx.args.cwd, ctx.args.dir)}`, + `--cwd=${templateDownloadPath}`, ctx.args.install ? '' : '--skipInstall', ctx.args.logLevel ? `--logLevel=${ctx.args.logLevel}` : '', ].filter(Boolean)