Skip to content

Bun.spawn/spawnSync, Bun.which: inherit live process.env instead of the startup snapshot - #34972

Open
robobun wants to merge 7 commits into
mainfrom
claude/farm/68b2c3e5/spawn-default-env-live-process-env
Open

Bun.spawn/spawnSync, Bun.which: inherit live process.env instead of the startup snapshot#34972
robobun wants to merge 7 commits into
mainfrom
claude/farm/68b2c3e5/spawn-default-env-live-process-env

ci: retrigger

3819377
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 21, 2026 in 15m 24s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/bun/spawn/spawn-env.test.ts:40 PATH-mutation test skips Windows with no equivalent coverage or skip comment

Annotations

Check warning on line 40 in test/js/bun/spawn/spawn-env.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

PATH-mutation test skips Windows with no equivalent coverage or skip comment

This test is `skipIf(isWindows)` with no Windows variant, so the PR's two PATH-related changes — `Bun.which` reading its default PATH from `process.env` (BunObject.rs:617) and `inherit_process_env` populating `path` for argv0 lookup — are unasserted on Windows, where the PATH lookup goes through the case-insensitive `Path` key (`JSSharedEnvMap`). REVIEW.md → "Cover the variant matrix … POSIX/Windows branches". A Windows variant (`.cmd` tool + `;` separator + `process.env.Path`) is straightforwar