Compare commits
2 Commits
main
...
fix/system
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
860dc74639 | ||
|
|
97acca47ac |
@ -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`.
|
||||
|
||||
38
src/daemon/systemd-unit.test.ts
Normal file
38
src/daemon/systemd-unit.test.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { parseSystemdExecStart } from "./systemd-unit.js";
|
||||
|
||||
describe("parseSystemdExecStart", () => {
|
||||
it("splits on whitespace outside quotes", () => {
|
||||
const execStart = "/usr/bin/clawdbot gateway start --foo bar";
|
||||
expect(parseSystemdExecStart(execStart)).toEqual([
|
||||
"/usr/bin/clawdbot",
|
||||
"gateway",
|
||||
"start",
|
||||
"--foo",
|
||||
"bar",
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves quoted arguments", () => {
|
||||
const execStart = "/usr/bin/clawdbot gateway start --name \"My Bot\"";
|
||||
expect(parseSystemdExecStart(execStart)).toEqual([
|
||||
"/usr/bin/clawdbot",
|
||||
"gateway",
|
||||
"start",
|
||||
"--name",
|
||||
"My Bot",
|
||||
]);
|
||||
});
|
||||
|
||||
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",
|
||||
]);
|
||||
});
|
||||
});
|
||||
@ -76,7 +76,7 @@ export function parseSystemdExecStart(value: string): string[] {
|
||||
inQuotes = !inQuotes;
|
||||
continue;
|
||||
}
|
||||
if (!inQuotes && /\\s/.test(char)) {
|
||||
if (!inQuotes && /\s/.test(char)) {
|
||||
if (current) {
|
||||
args.push(current);
|
||||
current = "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user