Repository navigation
Use Bun to update Bun-managed Pi installations - #3121
Merged
Merged
Conversation
3 tasks
2 tasks done
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.
Human comments
What was wrong
Pi maintenance resolved the active executable but ignored its ownership when constructing update commands, so both the displayed action and executable plan always selected npm. For a Pi wrapper delegating to Bun's global binary, npm can update a different prefix and leave the active version unchanged, causing the existing post-install verification to reject the result. The direct reproduction and root-cause report is https://get-bb.github.io/reports/issues/3119.html.
What changed
The Pi provider now probes Bun's global bin directory and recognizes a direct executable, symlink target, or bounded shell wrapper that delegates to Bun's Pi binary. Bun-managed installations use
bun add -g; all unrecognized and new-install cases retain the npm fallback. The same selection drives both the advertised maintenance action and the command returned for execution. The change is provider-local and does not alter the host-daemon protocol, public schema, dependencies, generated files, or stored data.How you verified
provider-maintenance.bun.test.ts; on unchangedorigin/mainit failed because the status returnednpm install -g, and after the fix it passes with the expected Bun display and execution plans.pnpm exec turbo run typecheck --filter=bb-plugin-provider-pipnpm exec turbo run test --filter=bb-plugin-provider-pi --force— 22 files and 122 tests passed.pnpm exec oxfmt plugins/provider-pi/src/bridge/provider-maintenance.ts plugins/provider-pi/src/bridge/provider-maintenance.bun.test.ts --checkgit diff --checkFixes #3119