mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-08 02:14:37 +00:00
b2a29ab68d
Two related bugs surfaced when testing MCP servers that spawn npx, node, python, etc. from Homebrew/nvm/asdf/mise installs. 1. MCP test reported success even when the connection failed. `hermes mcp test <server>` exits 0 even when the inner connection fails — it prints the error to stdout instead. Scarf trusted the exit code and rendered a green checkmark while the output said "✗ Connection failed: [Errno 2] No such file or directory: 'npx'". Fix: also scan output for ✗, "Connection failed", "No such file or directory", and "Error:" markers. 2. .app launches start with a minimal PATH that excludes Homebrew. When Scarf is launched from Finder/Dock, ProcessInfo's PATH is `/usr/bin:/bin:/usr/sbin:/sbin` — no /opt/homebrew/bin, no /usr/local/bin, no nvm/asdf/mise shims. Hermes inherits this and can't find npx/node/python when spawning MCP server subprocesses. Fix: query the user's login shell PATH once via `/bin/zsh -lc 'echo $PATH'`, cache it on HermesFileService, and inject it into both `runHermesCLI` and the ACP subprocess. Falls back to a sane default covering both Apple Silicon and Intel Homebrew if zsh query fails. Bumps version to 1.5.8 (build 10). Includes signed Universal + ARM64 binaries.