-
Notifications
You must be signed in to change notification settings - Fork 181
Add fallback to find claude path #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I just tested this and it works. Do you think we should make |
|
At the moment there are actually only two cases:
For the binary mode, directly searching the path should be able to replace all other logic; for js modules, searching the path should also work in theory. However, keeping |
|
Hey @tiann! Thanks for this PR - the PATH fallback is a great addition. I've merged your improvements into my bun-support branch (PR #91):
I extended it with:
I'd be happy (ahem... pun intended :-) ) to coordinate so we can get both our contributions merged! Happy to adjust anything on my side too. |
|
+1 on PATH-first priority @Enzime! I've implemented this in PR #91 - user preferences should be respected. My detection order is:
Env var first for explicit control, then PATH respects user's shell config. |
Incorporates tiann's improvements from slopus#83: - stdio suppression for cleaner which/where execution - Existence check before symlink resolution (safer) - Fallback to original path if resolution fails Combined with our branch's additions: - Source detection (npm, Bun, Homebrew, etc.) - PATH-first priority per @Enzime's suggestion Detection priority: PATH > npm > Bun > Homebrew > native Credit: @tiann (slopus#83)
Merges feature/bun-support-claude-cli-detection branch with: - Bun runtime detection and CLI discovery - HAPPY_CLAUDE_PATH env var override - PATH fallback from tiann's PR slopus#83 (stdio suppression, existence check) - Source detection (npm, Bun, Homebrew, native installer) Detection priority: HAPPY_CLAUDE_PATH > PATH > npm > Bun > Homebrew > native Also fixes test issues: - apiSession.test.ts: vi.hoisted pattern for mock hoisting - claudeLocal.test.ts: check spawn args instead of array mutation - runtime.test.ts: ESM imports instead of require() Credit: @tiann (slopus#83)
|
I've now got a version with a large range of fixes merged at #107 and I've had a zoom conversation with @bra1nDump about it. Fixes to the issues mentioned here are included. |
No description provided.