Skip to content

Give the missing-command test its own PATH - #1514

Merged
dylanplayer merged 1 commit into
mainfrom
codevisor/duck
Nov 28, 2026
Merged

dylanplayer merged 1 commit into
mainfrom
codevisor/duck

Conversation

@dylanplayer

Copy link
Copy Markdown
Member

What

The devtools test that checks runCommand / captureCommand reject (rather than crash or hang) when a command can't start looked up codevisor-missing-tool on the machine's own PATH. In agent shells where /usr/local/bin is on PATH but unreadable (drwx------ root), the OS command lookup returns EACCES instead of ENOENT, so the test failed and blocked bun run ship and the pre-push checks (hit by several agents, most recently on #1513).

The test now spawns with PATH set to an empty scratch folder, so the lookup is deterministic in any shell and on CI. The code under test is unchanged: passing the OS error through is correct.

Other tests

Ran the full turbo run test, dev:scripts:test and release:scripts:test with /usr/local/bin on PATH and with it removed. This was the only test whose result changed. The git-hosts CLI tests already isolate lookup with absolute paths and an empty env.

Verification

dev-shared-modules.test.ts "cannot start" test passes with:

  • ambient PATH (unreadable /usr/local/bin on it)
  • /usr/local/bin removed
  • a chmod 000 folder first on PATH

The old unisolated spawn gets EACCES, ENOENT, EACCES in those same three setups. Full devtools package: 194/194 pass under the ambient PATH.

🤖 Generated with Claude Code

The devtools test that spawns a missing command looked it up on the
ambient PATH. When a folder on that PATH can't be read (as /usr/local/bin
is in some agent shells on this Mac), the OS lookup answers EACCES
instead of ENOENT, so the test failed and blocked `bun run ship` and the
pre-push checks. It now spawns with PATH set to an empty scratch folder,
so the lookup is the same in every shell and on CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dylanplayer
dylanplayer merged commit bbf0e2a into main Nov 28, 2026
@dylanplayer
dylanplayer deleted the codevisor/duck branch November 28, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant