openclaw-matrix-multiaccounts/src
Robby 3d958d5466
fix(linux): add user bin directories to systemd service PATH for skill installation (#1512)
* fix(linux): add user bin directories to systemd service PATH

Fixes #1503

On Linux, the systemd service PATH was hardcoded to only include system
directories (/usr/local/bin, /usr/bin, /bin), causing binaries installed
via npm global with custom prefix or node version managers to not be found.

This adds common Linux user bin directories to the PATH:
- ~/.local/bin (XDG standard, pip, etc.)
- ~/.npm-global/bin (npm custom prefix)
- ~/bin (user's personal bin)
- Node version manager paths (nvm, fnm, volta, asdf)
- ~/.local/share/pnpm (pnpm global)
- ~/.bun/bin (Bun)

User directories are added before system directories so user-installed
binaries take precedence.

🤖 AI-assisted (Claude Opus 4.5 via Clawdbot)
📋 Testing: Existing unit tests pass (7/7)

* test: add comprehensive tests for Linux user bin directory resolution

- Add dedicated tests for resolveLinuxUserBinDirs() function
- Test path ordering (extraDirs > user dirs > system dirs)
- Test buildMinimalServicePath() with HOME set/unset
- Test platform-specific behavior (Linux vs macOS vs Windows)

Test count: 7 → 20 (+13 tests)

* test: add comprehensive tests for Linux user bin directory handling

- Test Linux user directories included when HOME is set
- Test Linux user directories excluded when HOME is missing
- Test path ordering (extraDirs > user dirs > system dirs)
- Test platform-specific behavior (Linux vs macOS vs Windows)
- Test buildMinimalServicePath() with HOME in env

Covers getMinimalServicePathParts() and buildMinimalServicePath()
for all Linux user bin directory edge cases.

Test count: 7 → 16 (+9 tests)
2026-01-23 19:06:14 +00:00
..
acp fix: stabilize acp streams and tests 2026-01-18 08:54:00 +00:00
agents test: stub heavy tools in agent tests 2026-01-23 18:34:33 +00:00
auto-reply test: move auto-reply directive coverage to e2e 2026-01-23 18:34:33 +00:00
browser Browser: suppress Chrome restore prompt 2026-01-21 21:27:34 -07:00
canvas-host chore: update a2ui bundle hash 2026-01-22 08:48:09 +00:00
channels test: fix discord action mocks 2026-01-23 09:06:04 +00:00
cli test: dedupe CLI onboard auth cases 2026-01-23 18:34:33 +00:00
commands fix: support direct token and provider in auth apply commands (#1485) 2026-01-23 07:27:52 +00:00
config fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
cron fix: honor accountId in message actions 2026-01-23 09:06:04 +00:00
daemon fix(linux): add user bin directories to systemd service PATH for skill installation (#1512) 2026-01-23 19:06:14 +00:00
discord fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
docs refactor: route channel runtime via plugin api 2026-01-18 11:01:16 +00:00
gateway fix(exec-approvals): stabilize allowlist ids (#1521) 2026-01-23 19:00:45 +00:00
hooks refactor: centralize config update logging 2026-01-23 04:01:26 +00:00
imessage fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
infra fix(exec-approvals): stabilize allowlist ids (#1521) 2026-01-23 19:00:45 +00:00
logging fix: align rolling logs to local time 2026-01-22 07:02:52 +00:00
macos fix: type gateway lock handle 2026-01-21 23:05:11 +00:00
markdown fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
media test: trim async waits in webhook tests 2026-01-23 18:34:33 +00:00
media-understanding test: add media auto-detect coverage 2026-01-23 05:47:13 +00:00
memory test: stabilize cron + async search timings 2026-01-23 06:38:16 +00:00
node-host fix: allow chained exec allowlists 2026-01-23 00:11:58 +00:00
pairing feat: add /allowlist command 2026-01-21 05:34:53 +00:00
plugin-sdk fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
plugins fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
process fix: suppress npm fund prompts 2026-01-21 03:47:50 +00:00
providers fix: log config update in copilot auth 2026-01-23 07:23:52 +00:00
routing fix: resolve ci failures 2026-01-18 08:45:29 +00:00
security fix: honor gateway env token for doctor/security 2026-01-23 03:16:52 +00:00
sessions fix: inherit model overrides for thread sessions 2026-01-22 06:03:23 +00:00
signal fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
slack fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
telegram fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
terminal fix: put plugin descriptions under source 2026-01-23 04:02:42 +00:00
test-helpers refactor: add hook guards and test helpers 2026-01-18 06:15:24 +00:00
test-utils refactor: route channel runtime via plugin api 2026-01-18 11:01:16 +00:00
tui fix: surface gateway slash commands in TUI 2026-01-23 18:58:41 +00:00
types chore: fix lint/format 2026-01-20 13:52:59 +00:00
utils fix: harden Mattermost plugin gating (#1428) (thanks @damoahdominic) 2026-01-23 01:23:23 +00:00
web fix: add per-channel markdown table conversion (#1495) (thanks @odysseus0) 2026-01-23 18:39:25 +00:00
whatsapp refactor: prune legacy group prefixes 2026-01-17 08:47:25 +00:00
wizard fix: always offer TUI hatch 2026-01-23 09:07:43 +00:00
channel-web.barrel.test.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
channel-web.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
docker-setup.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
entry.ts fix: harden windows argv parsing 2026-01-19 23:41:06 +00:00
git-hooks.test.ts fix: add git hook setup and stable config hash sorting 2026-01-19 02:02:17 +00:00
globals.test.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
globals.ts CLI: streamline startup paths and env parsing 2026-01-18 23:10:39 +00:00
index.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
index.ts fix: tame invalid config logging 2026-01-21 01:58:47 +00:00
logger.test.ts fix: align rolling logs to local time 2026-01-22 07:02:52 +00:00
logger.ts refactor(logging): split config + subsystem imports 2026-01-19 00:15:44 +00:00
logging.ts fix: unblock bundled plugin load 2026-01-18 19:34:21 +00:00
polls.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
polls.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
postinstall-patcher.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
runtime.ts perf: speed up memory batch polling 2026-01-18 03:55:14 +00:00
utils.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
utils.ts refactor: centralize config update logging 2026-01-23 04:01:26 +00:00
version.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00