From 898f0d94188cf367a94e75b7e4789e8be65f0c1e Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Fri, 8 Aug 2025 10:22:05 +0200 Subject: [PATCH 1/2] fix(init): Use correct directory for adding modules Previously, when the user selected a directory that already existed, and was then prompted to choose a different directory, and then selected a different directory, and also chose official modules to add, the official modules would be added to the initial directory, not the newly chosen one. --- packages/nuxi/src/commands/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxi/src/commands/init.ts b/packages/nuxi/src/commands/init.ts index 9532eca04..16904d5b1 100644 --- a/packages/nuxi/src/commands/init.ts +++ b/packages/nuxi/src/commands/init.ts @@ -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) From c491a4e360dd8519e8fb2e4aaecbc0136e671951 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 08:23:43 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- packages/nuxi/src/commands/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxi/src/commands/init.ts b/packages/nuxi/src/commands/init.ts index 16904d5b1..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'