fix: invoke Bun package exec via bun x on Windows - #104
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
🚫 Excluded labels (none allowed) (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughUse Replace Update related labels, documentation, schema text, and regression tests. Validate formatting, targeted tests, and Windows execution of WalkthroughThe Bun package-execution path now invokes Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant RunCommand
participant BunTool
participant Bun
RunCommand->>BunTool: request package execution
BunTool->>Bun: invoke `bun x` with package arguments
BunTool->>Bun: add `--bun` when forced
Bun-->>BunTool: execute package
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
Comment |
3cb322e to
62491c3
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
runner | 29387b5 | Commit Preview URL | Aug 03 2026, 03:51 PM |
62491c3 to
29387b5
Compare
Summary
bun xsubcommand instead of thebunxhard-link aliasbun x --bunWhy
On Windows, runner resolves executables through
PATHandPATHEXT. The standard uppercase.EXEentry can producebunx.EXE; released Bun versions classify the invocation name case-sensitively and treat that spelling as plainbun, resulting inerror: Script not foundfor an otherwise valid package.Using
bun xavoids depending on alias-name detection and keeps runner compatible with released Bun versions even if the upstream fix lands later.Fixes #103
Upstream: oven-sh/bun#36826 and oven-sh/bun#36827
Validation
cargo fmt --checkcargo test tool::bun::tests— 8 passedcargo test exec_uses_each_runtimes_own_primitive— passedcargo test --test runtime_override runtime_selects_the_exec_fallback_primitive— passedshoppingmall: patched runner prints→ bun x sort-package-json --version, returns exit 0, and reportssort-package-json 4.0.0A full Windows
cargo testrun reached 975 passed / 36 failed. The remaining failures are outside this Bun path and are dominated by existing Windows assumptions around absolute resolved executable paths, Unix-style file URIs, and temporary Git commits.