Repository navigation
fix(bun): Run real bun for bun run <existing path> - #3
Closed
tommy-gilligan wants to merge 1 commit into
Closed
tommy-gilligan wants to merge 1 commit into
tommy-gilligan wants to merge 1 commit into
Conversation
`bun run scripts/export` (a directory with an index.ts, or an extensionless file) has no `./` prefix or JS/TS extension, so it was routed to `aube run`, which treats it as a missing script name. Bun resolves package.json scripts first, then files and directories, so route to real bun when the target exists on disk and is not a script in the nearest package.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3iJyiXGsPx2vmoAat5eKX
tommy-gilligan
force-pushed
the
fix/aubeshim-bun-run-dir
branch
from
October 15, 2026 05:52
2b63b29 to
208f5cd
Compare
mwolson
added a commit
that referenced
this pull request
Oct 15, 2026
Bun resolves `bun run <target>` as a package.json script first, then a source file (adding extensions and `index.*`), a bin, or a system command. aube run only knows scripts and bins, so `bun run scripts/export` (a directory with an index.ts), `bun run scripts/build` (resolving to scripts/build.ts), and `bun run ls` all failed with "script not found". Route `bun run <target>` to real bun when the target is not a script in the nearest package.json. Targets after `--filter`/`-F` stay on aube, since they name scripts in workspace packages. Supersedes #3. Co-authored-by: Tommy Gilligan <tommy.gilligan@clinibase.com>
Owner
|
Thanks for tracking this down, @tommy-gilligan! I've landed a version of this fix on While testing I found a couple of cases that an existence check misses, so the final rule asks a different question:
aube only resolves scripts and bins (the same as pnpm, apart from bins), so 586250b sends Closing in favor of 586250b. Thanks again! |
Contributor
Author
|
OMG thank you for being so quick! <3 have a lovely day |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bun run scripts/export(a directory withindex.ts) currently goes toaube run, which fails because no script has that name. Bun itself checks package.json scripts first, then files and directories on disk.This change sends
bun run <target>to real bun when<target>exists relative to cwd and is not a script in the nearest package.json. Script names still win, as they do in bun.Tests: two new unit tests in
src/lib.rscover:fmtandclippy -D warningspass. On macOS,fish_activation_removes_existing_shim_entries_before_prependinganddebug_trace_shows_invocation_and_route(a/private/varsymlink mismatch) fail with or without this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01V3iJyiXGsPx2vmoAat5eKX