From d3c9dc33ac7da33b9ce04ba905aa9862e549f92c Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Mon, 3 Aug 2026 16:20:14 +0200 Subject: [PATCH 1/3] fix: invoke Bun package exec via bun x --- CHANGELOG.md | 7 +++++ README.md | 8 +++--- npm/facade/README.md | 2 +- schemas/doctor.schema.json | 2 +- site/src/index.html | 2 +- src/cli.rs | 4 +-- src/cmd/run.rs | 2 +- src/cmd/run/dispatch.rs | 14 +++++----- src/cmd/run/local_file.rs | 14 +++++----- src/cmd/run/qualify.rs | 4 +-- src/cmd/run/runtime.rs | 28 ++++++++++++++------ src/tool/bun.rs | 53 ++++++++++++++++++++++++-------------- src/types.rs | 2 +- tests/runtime_override.rs | 2 +- 14 files changed, 88 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f174ee3..a637fb37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,13 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic ### Fixed +- Bun package-exec fallback now invokes the explicit `bun x` subcommand instead + of the `bunx` hard-link alias. On Windows, runner resolves bare executables + through `PATH` and `PATHEXT`; the stock uppercase `.EXE` produced `bunx.EXE`, + which Bun's case-sensitive invocation-name detection misclassified as plain + `bun` and reported `Script not found` for the requested package + (https://github.com/kjanat/runner/issues/103, + https://github.com/oven-sh/bun/issues/36826). - `install.sh` now completes on Alpine and other busybox userlands. Checksum verification called `sha256sum -c --status`, and `--status` is GNU-only, so busybox aborted the install right after downloading the archive diff --git a/README.md b/README.md index 3ae2fde1..7fe54274 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ And re-read/review the readme... **runner** is for people who bounce between codebases and refuse to memorize each repo’s private little task-running religion. -Instead of guessing whether this one wants `npm run`, `pnpm exec`, `bunx`, +Instead of guessing whether this one wants `npm run`, `pnpm exec`, `bun x`, `cargo`, `uv run`, `deno task`, `turbo`, `make`, `just`, etc. type: ```sh @@ -380,7 +380,7 @@ Failing that, it executes `` through the detected toolchain where appropriate, such as: ```text -npm exec / npx, yarn run / yarn exec, pnpm exec, bun x / bunx, +npm exec / npx, yarn run / yarn exec, pnpm exec, bun x, deno x, uvx, go run ``` @@ -401,13 +401,13 @@ manager gets no vote: | `--runtime` | `package.json` script | local file | ad-hoc binary | | ----------- | ---------------------- | ----------------- | ------------- | | `node` | `node --run ` | `node ` | `npx` | -| `bun` | `bun --bun run ` | `bun ` | `bunx --bun` | +| `bun` | `bun --bun run ` | `bun ` | `bun x --bun` | | `deno` | `deno task ` | `deno run ` | `deno x` | ```sh run --runtime bun build # bun --bun run build run --runtime bun ./cli.js # bun ./cli.js, even with a #!/usr/bin/env node line -run --runtime bun eslint . # bunx --bun eslint . +run --runtime bun eslint . # bun x --bun eslint . ``` `bun run build` starts the script under bun, but a dependency bin carrying a diff --git a/npm/facade/README.md b/npm/facade/README.md index d8d31c89..6f5a320e 100644 --- a/npm/facade/README.md +++ b/npm/facade/README.md @@ -15,7 +15,7 @@ runner install --frozen test build ``` Instead of remembering whether this project wants `npm run`, `pnpm exec`, -`bunx`, `cargo`, `uv run`, `deno task`, `make`, `just`, `go-task`, or a monorepo +`bun x`, `cargo`, `uv run`, `deno task`, `make`, `just`, `go-task`, or a monorepo wrapper, use the same shape everywhere. ## What You Get diff --git a/schemas/doctor.schema.json b/schemas/doctor.schema.json index 0b429f03..e06d108e 100644 --- a/schemas/doctor.schema.json +++ b/schemas/doctor.schema.json @@ -412,7 +412,7 @@ "const": "node" }, { - "description": "Bun, via `bun --bun run