Skip to content

fix: broaden CLI binary lookup to native installer paths#731

Closed
dingtang2008 wants to merge 1 commit intosteipete:mainfrom
dingtang2008:fix/native-installer-paths
Closed

fix: broaden CLI binary lookup to native installer paths#731
dingtang2008 wants to merge 1 commit intosteipete:mainfrom
dingtang2008:fix/native-installer-paths

Conversation

@dingtang2008
Copy link
Copy Markdown
Contributor

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 official curl -fsSL https://claude.ai/install.sh | bash installs the native binary.
  • ~/.claude/local/claude — where claude migrate-installer moves 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/claude as 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 for resolveClaudeBinary still hold because the new paths only participate at the well-known tier and each test seeds its own MockFileManager executable set.
  • Manual: on a machine with only ~/.local/bin/claude present, CodexBar now detects and uses it.

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>
@ratulsarna
Copy link
Copy Markdown
Collaborator

Thanks @dingtang2008 ! This change is rebased onto main with you as co-author.

@ratulsarna ratulsarna closed this Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants