Describe the bug
bun vitest run # works
bunx -p vite-plus@0.2.4 vp run gate:test # task = "bun vitest run"
# $ bunx --bun vitest run
# $ bunx --bun vitest run
# … repeats forever (~15/s, 119× in 8s); SIGABRT storm once the fspy shm ring exhausts
Why: vp's task PATH ships bunx as the same shim as bun — exec "$basedir/bun.native" "$@". Real bunx is a symlink to bun; the binary dispatches on argv0 == "bunx" (bins only, never package.json scripts). The shim loses argv0, so in vp tasks bunx <args> ≡ bun <args> → the wrapper script re-invokes itself.
Proof it's the shim (same binary, different invoked name): .../bin/bunx probe runs the package.json SCRIPT; ln -s bun.native bunx && ./bunx probe runs the BIN.
Fix: ship unix bunx as a symlink to bun.native (as bun does), or exec "$basedir/bun.native" x "$@"; bunx.cmd/.ps1 have the same defect. Possibly explains #1627 (CI process explosion since v0.1.21, closed no-repro).
Reproduction URL
https://github.com/beorn/repro-vite-plus-bunx-shim
Steps to reproduce
Clone → bun install → timeout 8 bunx -p vite-plus@0.2.4 vp run gate:test.
System info
vp 0.2.4 (vp env n/a at 0.2.4); managed bun 1.3.14; system bun 1.3.x; node 24; macOS arm64.
Used Package Manager
bun
Validations
Not an upstream bun issue (symlink proof above). No prior report; nearest: #1971 / #1935 / #1948 / #2091, and #1627.
Disclosure: prepared with help from Claude Fable (Anthropic) as part of our Bun-monorepo → Vite+ effort; verified with live runs and human-reviewed.
Describe the bug
Why: vp's task
PATHshipsbunxas the same shim asbun—exec "$basedir/bun.native" "$@". Real bunx is a symlink to bun; the binary dispatches onargv0 == "bunx"(bins only, never package.json scripts). The shim loses argv0, so in vp tasksbunx <args>≡bun <args>→ the wrapper script re-invokes itself.Proof it's the shim (same binary, different invoked name):
.../bin/bunx proberuns the package.json SCRIPT;ln -s bun.native bunx && ./bunx proberuns the BIN.Fix: ship unix
bunxas a symlink tobun.native(as bun does), orexec "$basedir/bun.native" x "$@";bunx.cmd/.ps1have the same defect. Possibly explains #1627 (CI process explosion since v0.1.21, closed no-repro).Reproduction URL
https://github.com/beorn/repro-vite-plus-bunx-shim
Steps to reproduce
Clone →
bun install→timeout 8 bunx -p vite-plus@0.2.4 vp run gate:test.System info
vp 0.2.4 (
vp envn/a at 0.2.4); managed bun 1.3.14; system bun 1.3.x; node 24; macOS arm64.Used Package Manager
bun
Validations
Not an upstream bun issue (symlink proof above). No prior report; nearest: #1971 / #1935 / #1948 / #2091, and #1627.
Disclosure: prepared with help from Claude Fable (Anthropic) as part of our Bun-monorepo → Vite+ effort; verified with live runs and human-reviewed.