fix: Windows support for Claude CLI path resolution#58
Open
thoraxe wants to merge 1 commit intovultuk:mainfrom
Open
fix: Windows support for Claude CLI path resolution#58thoraxe wants to merge 1 commit intovultuk:mainfrom
thoraxe wants to merge 1 commit intovultuk:mainfrom
Conversation
- Add Windows-specific paths to search for Claude CLI executable - Use 'where' command instead of 'which' on Windows - Return full path from commandExists() to fix node-pty spawn issues - Add CLAUDE_COMMAND environment variable override - Use USERPROFILE for home directory on Windows node-pty on Windows requires the full path to executables, not just the command name. This change ensures the full path is resolved and used when spawning the Claude process. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
wherecommand instead ofwhichon WindowscommandExists()to fix node-pty spawn issuesCLAUDE_COMMANDenvironment variable overrideUSERPROFILEfor home directory on WindowsProblem
On Windows, node-pty requires the full path to executables, not just the command name. The previous implementation would find
claudevia thewherecommand but return just the string'claude'instead of the full path, causing node-pty to fail with "File not found" errors.Solution
Modified
commandExists()to return the full resolved path fromwhere/whichoutput, and updatedfindClaudeCommand()to use this full path when spawning processes.Test plan
~/.local/bin/claude.exe🤖 Generated with Claude Code