From 860dc746391a615e30d69b8b91f02ec2957504ce Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 16 Jan 2026 06:03:17 +0000 Subject: [PATCH] fix: adjust systemd ExecStart escape test (#995) (thanks @roshanasingh4) --- CHANGELOG.md | 1 + src/daemon/systemd-unit.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34876ceed4..87da990a12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Fix: guard model fallback against undefined provider/model values. (#954) — thanks @roshanasingh4. - Fix: refactor session store updates, add chat.inject, and harden subagent cleanup flow. (#944) — thanks @tyler6204. - Fix: clean up suspended CLI processes across backends. (#978) — thanks @Nachx639. +- Fix: parse systemd ExecStart arguments when whitespace is present. (#995) — thanks @roshanasingh4. - CLI: add `--json` output for `clawdbot daemon` lifecycle/install commands. - Memory: make `node-llama-cpp` an optional dependency (avoid Node 25 install failures) and improve local-embeddings fallback/errors. - Browser: add `snapshot refs=aria` (Playwright aria-ref ids) for self-resolving refs across `snapshot` → `act`. diff --git a/src/daemon/systemd-unit.test.ts b/src/daemon/systemd-unit.test.ts index b7eced7c0a..9a83d58746 100644 --- a/src/daemon/systemd-unit.test.ts +++ b/src/daemon/systemd-unit.test.ts @@ -25,14 +25,14 @@ describe("parseSystemdExecStart", () => { ]); }); - it("supports backslash-escaped characters", () => { - const execStart = "/usr/bin/clawdbot gateway start --path \/tmp\/clawdbot"; + it("preserves backslashes in arguments", () => { + const execStart = String.raw`/usr/bin/clawdbot gateway start --path \/tmp\/clawdbot`; expect(parseSystemdExecStart(execStart)).toEqual([ "/usr/bin/clawdbot", "gateway", "start", "--path", - "/tmp/clawdbot", + "\\/tmp\\/clawdbot", ]); }); });