Repository navigation
fix(pi): use the shell-selected node when launching from finder - #8
Merged
Merged
Conversation
Owner
|
Thanks, merged and out in 0.2.13. I could reproduce it here with another node ahead on the inherited PATH: the version check failed before and works now. I added one small change on top (908d7ae). Putting node's directory at the very front has a side effect when it's a shared one like If it still picks the wrong node on your machine after the update, let me know. |
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.
On macOS, the PATH inherited from Finder can include Homebrew’s Node while the login shell selects a different version through mise. With pi installed separately, this caused the version check to fail even though the same pi worked in a terminal.
Keep the executable directory first. When pi has no adjacent Node, look up Node in the login shell, fall back to the inherited PATH, and put the selected directory ahead of the inherited entries.
Verified on macOS with a LaunchServices probe calling the production version check and RPC startup. Both pi processes reported mise Node v26.13.0 via
process.execPath. The version check returned pi 1.7.0 and the RPCget_staterequest succeeded. All five pi module tests passed.