Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/six-ends-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/router-cli': patch
---

Fix CLI commands not executing by passing process.argv.slice(2) to yargs
4 changes: 3 additions & 1 deletion packages/router-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { watch } from './watch'
main()

export function main() {
yargs()
yargs(process.argv.slice(2))
.scriptName('tsr')
.usage('$0 <cmd> [args]')
.demandCommand(1)
.strictCommands()
.command('generate', 'Generate the routes for a project', async () => {
const config = getConfig()
await generate(config, process.cwd())
Expand Down