mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: openclaw and zeroclaw reconnect broken by launch command validation (#2215)
The launchCmd() for openclaw contained inline shell logic (if/while/$()) that fails validateLaunchCmd() allowlist on reconnect. The zeroclaw launchCmd() used quoted export PATH="..." which also fails validation. Users running `spawn enter` for these agents got a hard exit with "corrupted history" error. Fix: simplify openclaw launchCmd to remove redundant gateway startup logic (already handled by systemd supervision), and remove quotes from zeroclaw export PATH value. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5dfb91b747
commit
0e4f41fa15
3 changed files with 7 additions and 11 deletions
|
|
@ -210,9 +210,11 @@ describe("validateLaunchCmd", () => {
|
|||
).not.toThrow();
|
||||
});
|
||||
|
||||
it("should accept zeroclaw launch command with cargo env", () => {
|
||||
it("should accept zeroclaw launch command with cargo env and PATH", () => {
|
||||
expect(() =>
|
||||
validateLaunchCmd("source ~/.cargo/env 2>/dev/null; source ~/.spawnrc 2>/dev/null; zeroclaw agent"),
|
||||
validateLaunchCmd(
|
||||
"export PATH=$HOME/.cargo/bin:$PATH; source ~/.cargo/env 2>/dev/null; source ~/.spawnrc 2>/dev/null; zeroclaw agent",
|
||||
),
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue