fix: execute Claude CLI commands through WSL on Windows #139

Merged
naomi merged 3 commits from fix/windows into main 2026-02-08 13:48:03 -08:00

3 Commits

Author SHA1 Message Date
hikari dfbb6a9b64 fix: dynamically resolve Claude binary path on Windows
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 2m9s
CI / Lint & Test (pull_request) Successful in 21m19s
CI / Build Linux (pull_request) Successful in 24m4s
CI / Build Windows (cross-compile) (pull_request) Successful in 34m53s
Previously hardcoded `/home/naomi/.local/bin/claude` which would break
for other users. Now uses `wsl -e bash -l -c "which claude"` to find
the Claude binary dynamically using a login shell that has the full PATH.

Also updated 6 plugin/marketplace functions that were still using
`std::process::Command::new("claude")` directly instead of the
`create_claude_command()` helper:
- enable_plugin
- disable_plugin
- update_plugin
- list_marketplaces
- add_marketplace
- remove_marketplace

This ensures all Claude CLI commands work properly on Windows regardless
of where Claude is installed, whilst maintaining backwards compatibility.

 This fix was created by Hikari~ 🌸
2026-02-08 12:33:26 -08:00
hikari 269f33b52a fix: execute Claude CLI commands through WSL on Windows
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m0s
CI / Lint & Test (pull_request) Successful in 17m40s
CI / Build Linux (pull_request) Successful in 24m39s
CI / Build Windows (cross-compile) (pull_request) Successful in 42m6s
Resolves #137

Claude CLI commands (plugin list, MCP list, version check, etc.) were
being executed directly in Windows context where the `claude` binary
doesn't exist. This caused "program not found" errors across the UI.

Changes:
- Added `create_claude_command()` helper that automatically prefixes
  commands with `wsl` on Windows builds
- Updated 8 command functions to use the helper:
  - get_claude_version
  - list_plugins
  - install_plugin
  - uninstall_plugin
  - list_mcp_servers
  - remove_mcp_server
  - add_mcp_server
  - get_mcp_server_details
- Added comprehensive tests for both Windows and Linux contexts

This ensures all Claude CLI commands execute in the correct WSL
context on Windows, fixing the memory pane, plugin pane, MCP servers
pane, and CLI version detection.

 This fix was created by Hikari~ 🌸
2026-02-08 12:04:35 -08:00
hikari e4b27bdff3 fix: execute Claude CLI commands through WSL on Windows
Resolves #137

Claude CLI commands (plugin list, MCP list, version check, etc.) were
being executed directly in Windows context where the `claude` binary
doesn't exist. This caused "program not found" errors across the UI.

Changes:
- Added `create_claude_command()` helper that automatically prefixes
  commands with `wsl` on Windows builds
- Updated 7 command functions to use the helper:
  - get_claude_version
  - list_plugins
  - install_plugin
  - uninstall_plugin
  - list_mcp_servers
  - enable_mcp_server
  - disable_mcp_server
- Added comprehensive tests for both Windows and Linux contexts

This ensures all Claude CLI commands execute in the correct WSL
context on Windows, fixing the memory pane, plugin pane, MCP servers
pane, and CLI version detection.

 This fix was created by Hikari~ 🌸
2026-02-08 12:01:27 -08:00