Skip to content

Commit ae9a92d

Browse files
authored
fix(@react-router/dev): prevent argv parsing crash when optionnal args are passed to the cli (#12609)
1 parent 329fc0a commit ae9a92d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
- pavsoldatov
234234
- pcattori
235235
- petersendidit
236+
- phildl
236237
- pierophp
237238
- printfn
238239
- promet99

packages/react-router-dev/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let arg = require("arg");
55
// default `NODE_ENV` so React loads the proper version in it's CJS entry script.
66
// We have to do this before importing `run.ts` since that is what imports
77
// `react` (indirectly via `react-router`)
8-
let args = arg({}, { argv: process.argv.slice(2) });
8+
let args = arg({}, { argv: process.argv.slice(2), stopAtPositional: true });
99
if (args._[0] === "dev") {
1010
process.env.NODE_ENV = process.env.NODE_ENV ?? "development";
1111
} else {

0 commit comments

Comments
 (0)