Skip to content

fix(gateway): include user-local bin paths in systemd unit PATH (salvage #3357 #3358 #3330 #3328)#3527

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-a2b72b01
Mar 28, 2026
Merged

fix(gateway): include user-local bin paths in systemd unit PATH (salvage #3357 #3358 #3330 #3328)#3527
teknium1 merged 1 commit intomainfrom
hermes/hermes-a2b72b01

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Consolidation of 4 duplicate PRs that all fix the same issue: systemd unit PATH missing user-local binary directories.

Problem: The generated systemd unit only includes venv, node_modules, and system bin paths. Tools installed via uv, pipx, cargo, go, etc. at ~/.local/bin, ~/.cargo/bin, etc. aren't discoverable, breaking MCP servers and terminal commands.

Fix: Adds _build_user_local_paths() helper that discovers existing user-local bin dirs (~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin) and includes them in PATH. Correctly handles both user and system service home directories.

Attribution: Best implementation structure from @ksze (#3357), tests from @kagura-agent (#3358), all 4 contributors credited.

Closes #3357, closes #3358, closes #3330, closes #3328.

Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the
systemd unit PATH so tools installed via uv/pipx/cargo/go are
discoverable by MCP servers and terminal commands.

Uses a _build_user_local_paths() helper that checks exists() before
adding, and correctly resolves home dir for both user and system
service types.

Co-authored-by: kagura-agent <Kagura>
Co-authored-by: ygd58 <buray>
Co-authored-by: Mibayy <Mibay>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants