GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Managed Bun toolchain: bunx shim drops argv0 dispatch — `bunx <name>` behaves as `bun <name>`, causing infinite self-recursion with common wrapper scripts · Issue #2123 · voidzero-dev/vite-plus

Managed Bun toolchain: bunx shim drops argv0 dispatch — bunx <name> behaves as bun <name>, causing infinite self-recursion with common wrapper scripts #2123

New issue
Copy link
New issue
Copy link
Closed
Bug
#2151
Closed
Managed Bun toolchain: bunx shim drops argv0 dispatch — bunx <name> behaves as bun <name>, causing infinite self-recursion with common wrapper scripts#2123
Bug
#2151
Copy link
Assignees
liangmiQwQ
Labels
bugSomething isn't working

Description

@beorn
beorn
opened on Jul 9, 2026
Issue body actions

Describe the bug

// package.json
"scripts": { "vitest": "bunx --bun vitest" }
bun vitest run                              # works
bunx -p [email protected] 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 [email protected] 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.

Reacted by Liang

Activity

  1. liangmiQwQ commented on Jul 11, 2026

    @liangmiQwQ
    liangmiQwQ
    on Jul 11, 2026
    Collaborator
    More actions

    It is indeed a bun-related bug. It will be fixed soon. Thanks for your reporting.

    Reacted by JongKyung Lee
  2. liangmiQwQ
    self-assigned this
    on Jul 11, 2026
  3. liangmiQwQ
    added the
    Bug
    issue type on Jul 11, 2026
  4. liangmiQwQ
    added
    bugSomething isn't working
    on Jul 11, 2026
  5. daiksud
    added a commit that references this issue on Aug 5, 2026

    feat(vite-plus): manage Node.js and Bun with Vite+ (#54)

    496e023
  6. fengmk2
    added a commit that references this issue on Aug 6, 2026

    fix(install): dispatch managed bunx through bun x (#2151)

    This issue will close once commit f59dc44 is merged into the 'main' branch.
    f59dc44
  7. fengmk2
    closed this as completedin #2151on Aug 6, 2026
  8. liangmiQwQ commented on Aug 6, 2026

    @liangmiQwQ
    liangmiQwQ
    on Aug 6, 2026
    Collaborator
    More actions

    Hello! This is fixed in #2151, you need to run vp env clean after your upgrade to the next release because this fix only effects new bun installation :)

    Reacted by JongKyung Lee
  9. wan9chi
    added a commit that references this issue on Aug 18, 2026

    fix(fspy): replace quiescence locking with crash-tolerant shared-memo…

    c83bad8
  10. daiksud
    added a commit that references this issue on Sep 2, 2026

    feat(vite-plus): manage Node.js and Bun with Vite+ (#54)

    163616e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @liangmiQwQ
    liangmiQwQ

Labels

bugSomething isn't working

Type

Bug

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.