From 1bf5d0fdeaffbf6c30410fdad0c4888a43d439ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A2=85=EA=B2=BD?= Date: Mon, 20 Apr 2026 14:17:59 +0900 Subject: [PATCH] fix(create): stop forwarding `--` to npx-invoked remote templates `formatDlxCommand` injected `--` between the package name and its args on the npx path, producing `npx -- `. Per the npm v8 `npx` docs, the documented form places `--` before the package name; the trailing `--` is forwarded to the underlying binary. Commander-based subcommand CLIs (e.g., `@tanstack/cli create`) interpret it as end-of-options and promote subsequent flags into positionals, exceeding the subcommand's arity. Drop the `--` injection for npx; pnpm/yarn/bun paths unchanged. --- packages/cli/src/create/command.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cli/src/create/command.ts b/packages/cli/src/create/command.ts index cd5c4e17e6..39fe68318e 100644 --- a/packages/cli/src/create/command.ts +++ b/packages/cli/src/create/command.ts @@ -168,10 +168,9 @@ export function formatDlxCommand( workspaceInfo: WorkspaceInfo, ) { const runner = getPackageRunner(workspaceInfo); - const dlxArgs = runner.command === 'npx' ? ['--', ...args] : args; return { command: runner.command, - args: [...runner.args, packageName, ...dlxArgs], + args: [...runner.args, packageName, ...args], }; }