cli: classify the subcommand past --cwd/--env-file values - #36644
Open
robobun wants to merge 9 commits into
Open
cli: classify the subcommand past --cwd/--env-file values#36644robobun wants to merge 9 commits into
robobun wants to merge 9 commits into
Claude / Claude Code Review
completed
Aug 1, 2026 in 34m 39s
Code review found 1 important issue
Found 1 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/cli/mod.rs:803-815 |
apply_leading_cwd() applies first --cwd; every other parser applies last |
Annotations
Check warning on line 815 in src/runtime/cli/mod.rs
claude / Claude Code Review
apply_leading_cwd() applies first --cwd; every other parser applies last
`apply_leading_cwd()` returns after the **first** `--cwd` match, so `bun --cwd a --cwd b init -y` chdirs to `a/`; every other `--cwd` consumer (`arguments::parse`, `CommandLineArguments::parse`) uses bun_clap's last-wins semantics and would chdir to `b/`. Track the last-seen `dir` in a local and chdir once after the loop instead of `return`ing on match — that keeps init/bunx/create consistent with run/test/install on repeated `--cwd`.
Loading