Commit 1ad7203
authored
fix(create): stop forwarding
Closes #1420.
## Summary
`vp create @tanstack/start` fails with `error: too many arguments for
'create'. Expected 1 argument but got 2.` on npm (reproducible on macOS
and Windows, not platform-specific as originally reported).
## Root cause
`formatDlxCommand` injected `--` between the package name and its args
on the npx path (`npx <pkg> -- <args>`). Per the [npm v8 `npx`
docs](https://docs.npmjs.com/cli/v8/commands/npx), `--` belongs before
the package name; when placed after, npx forwards it to the target
binary. Commander then treats it as end-of-options and promotes
subsequent flags into positional args — exceeding `@tanstack/cli create
[project-name]`'s arity of 1.
Single-entry CLIs (`create-vite`, `create-nuxt`, `sv`) absorbed the
stray `--` harmlessly, which is why this surfaced only after #1238
switched to the Commander-based `@tanstack/cli create`. Fix drops the
`--` from the npx branch; non-npx runners unchanged.
## Verification
Manual smoke in scratch directories with npm and pnpm:
- `vp create @tanstack/start` — TanStack `create` interactive prompt
reached (fix verified for #1420).
- `vp create vite` — `create-vite` prompt reached (blast-radius check).
- `vp create nuxt` — `create-nuxt` prompt reached (blast-radius check).-- to npx-invoked remote templates (#1421)1 parent 9b57c4b commit 1ad7203
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
0 commit comments