fix: broaden CLI binary lookup to native installer paths#731
Closed
dingtang2008 wants to merge 1 commit intosteipete:mainfrom
Closed
fix: broaden CLI binary lookup to native installer paths#731dingtang2008 wants to merge 1 commit intosteipete:mainfrom
dingtang2008 wants to merge 1 commit intosteipete:mainfrom
Conversation
Expand the well-known path list to include ~/.local/bin (default location produced by the official install.sh) and ~/.claude/local (post-migration location produced by `migrate-installer`), in addition to existing Homebrew and npm paths. Lookup order is unchanged — login-shell PATH still wins — so npm and Homebrew installations are unaffected.
ratulsarna
added a commit
that referenced
this pull request
Apr 18, 2026
…731) Co-Authored-By: dingtang <650383+dingtang2008@users.noreply.github.com>
Collaborator
|
Thanks @dingtang2008 ! This change is rebased onto main with you as co-author. |
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.
Summary
Expand
claudeWellKnownPaths()so the CLI lookup also covers the native installer's default output locations, in addition to the existing Homebrew / npm paths:~/.local/bin/claude— where the officialcurl -fsSL https://claude.ai/install.sh | bashinstalls the native binary.~/.claude/local/claude— whereclaude migrate-installermoves an npm-managed install for self-updates.Lookup order is unchanged (login-shell PATH still wins, then env PATH, then
command -v, then aliases, then well-known paths), so Homebrew / npm users are unaffected. This only helps the subset of users who installed via the native installer and haven't added the location to their shell PATH (e.g., launching from Finder on macOS where the login-shell PATH isn't captured).CHANGELOG v0.7.0 already advertised
~/.claude/local/claudeas supported; that entry currently doesn't match the code, and this PR realigns the two.Test plan
swift build -c release— clean.swift test --filter PathBuilderTests— 19/19 passing; existing tests forresolveClaudeBinarystill hold because the new paths only participate at the well-known tier and each test seeds its ownMockFileManagerexecutable set.~/.local/bin/claudepresent, CodexBar now detects and uses it.