把 configure/agents-add 取消退出码改为非 0,避免脚本误判成功
社区修复了向导取消返回 0 的问题,适合用于自动化安装链路,防止 set -e 场景下误继续执行。
GITHUBDiscovered 2026-02-12Author 0xRaini
Prerequisites
- You use shell scripts/CI jobs to run `openclaw configure` or `openclaw agents add`.
- Pipeline currently assumes cancel = success or lacks explicit exit-code checks.
Steps
- Pin/upgrade OpenClaw to a version that includes the non-zero cancel-exit fix.
- Update automation scripts to stop on non-zero and branch into manual recovery path.
- Add a test case that intentionally cancels wizard flow and asserts job failure.
- Document cancellation behavior in runbooks to reduce operator confusion.
Commands
set -eopenclaw configureopenclaw agents addVerify
When wizard is cancelled, shell receives non-zero exit and subsequent steps do not execute.
Caveats
- Exact released version containing this fix should be confirmed from upstream changelog(需验证).
- Legacy scripts that relied on cancel=0 may need migration.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗