fix: ensure node is available in PATH when using login shell on macOS/Linux #30
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.
Problem
Even when specifying the absolute path to Node.js and claude-code-acp, opening Agent Chat resulted in a
Command Not Founderror on macOS/Linux.Cause
claude-code-acpis a Node.js script with the shebang#!/usr/bin/env node.https://github.com/zed-industries/claude-code-acp/blob/09106474ea733ba5cc3b8f6ca3a521b6a131eed9/src/index.ts#L1
While the command itself was found via the absolute path,
/usr/bin/envcould not findnodein PATH, resulting in exit code 127.On macOS/Linux, commands are executed via
/bin/zsh -l -c 'command'(login shell). Login shells read initialization files (.zprofile,.zshrc, etc.) which re-set PATH. As a result, modifications toenv.PATHpassed tospawn()were overwritten by the shell initialization process and lost.Solution
When using a login shell on macOS/Linux with
nodePathconfigured, we now prependexport PATH='nodeDir':"$PATH";to the shell command. This ensures the Node directory is added to the beginning of PATH after the login shell initialization completes.Background
OS: macOS 26.1
Obsidian: 1.10.6
Shell: fish
Node.js path:
/Users/handlename/.local/share/mise/installs/node/24.8.0/bin/node(installed via mise)claude-code-acp path:
/Users/handlename/.local/share/mise/installs/node/24.8.0/bin/claude-code-acp