Repository navigation
fix(desktop): start the app from Finder, with the installation's Bun on its PATH - #881
Open
dustywusty wants to merge 1 commit into
Open
dustywusty wants to merge 1 commit into
dustywusty wants to merge 1 commit into
Conversation
…on its PATH
The app runs as a package script (`bun run serve`), and that script runs `bun` again by name. A
desktop app opened from Finder or the Dock has the system's minimal PATH, which has no `bun`, so
the app exited with status 127 at Start ("bun: command not found"). The server and worker run Bun
on a file and were unaffected.
Every host process now gets the directory of the Bun this installation downloaded first on its
PATH, with the rest of PATH kept after it (`stack::bun_command`).
dustywusty
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 29, 2026 08:55
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
What this changes
Opened from Finder or the Dock, the desktop app stops at Start with "OpenBot did not start". The technical details say:
Every process the desktop starts now gets the directory of the Bun it installed first on its
PATH(stack::bun_command, used byspawn_host_process). The rest ofPATHis kept after it.Root cause
openbot-engine/bun-1.4.3/bun src/index.ts). It starts the app differently:bun run serve, a package script. That script isbun scripts/serve-or-build.ts && bun serve.ts, which runsbunagain by name through the shell. The child inherits the desktop'sPATH. An app opened from Finder has macOS's minimal/usr/bin:/bin:/usr/sbin:/sbin, which has nobun. So only the app died, with 127.c27c1d0c) ran the app as a package script. Its script has calledbunby name ever since:bun run build && bun serve.ts, and from perf: speed up web startup and reduce route and preview work #584 (a331c72c)bun scripts/serve-or-build.ts && bun serve.ts.bun. Fix fresh desktop installation without developer tools #604 (d779eaf6) made the desktop download its own Bun and run it by its full path, for machines without developer tools. Nothing put that Bun on its children'sPATH.open, on a Mac whosebunis a mise shim (not on the systemPATH). The app log is quoted above. The server and worker started; only the app failed.tauri devfrom a terminal, and thatPATHhas the developer'sbun.bunand pass a testPATH. None starts the realservescript with the minimalPATHan app gets from Finder.a_host_process_finds_the_installations_own_bun_by_namechecks that a host process'sPATHstarts with the installation's Bun directory and keeps the rest. With thePATHline removed, it fails (a host process is given a PATH).Not affected: #832's branch, where #852 replaced the host processes with containers.
Where it runs
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased("The desktop app starts OpenBot when it is opened from Finder").Proof
desktop/src-tauri:cargo fmt --check,cargo clippy --locked --all-targets -- -D warningsandcargo test --locked --lib --binspass on macOS arm64. Windows and Linux left to CI.