Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@react-router/dev): prevent argv parsing crash when optionnal args are passed to the cli #12609

Merged
merged 2 commits into from
Dec 21, 2024
Merged
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
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
- pavsoldatov
- pcattori
- petersendidit
- phildl
- pierophp
- printfn
- promet99
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dev/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let arg = require("arg");
// default `NODE_ENV` so React loads the proper version in it's CJS entry script.
// We have to do this before importing `run.ts` since that is what imports
// `react` (indirectly via `react-router`)
let args = arg({}, { argv: process.argv.slice(2) });
let args = arg({}, { argv: process.argv.slice(2), stopAtPositional: true });
if (args._[0] === "dev") {
process.env.NODE_ENV = process.env.NODE_ENV ?? "development";
} else {
Expand Down
Loading