mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-29 19:43:58 +00:00
fix(policy): print JSON errors on stdout for policy check, compare and watch failures `openclaw policy check`, `policy compare` and `policy watch` printed nothing on stdout when the command itself failed, even with --json or with output piped to another program, which broke scripts that read the documented machine-readable error. Each failure now prints one standard cli_error JSON document on stdout; piped output matches --json, and stderr and terminal output are unchanged. Evidence: built CLI. On main the three failures printed 0 bytes on stdout (twice); with this change they print one cli_error document each (123, 95 and 89 bytes) (twice), with the same result when piped. Real terminal runs and all stderr output are unchanged. Thanks @Leon-SK668. Co-authored-by: Ayaan Zaidi <hi@obviy.us> |
||
|---|---|---|
| .. | ||
| attestation.md | ||
| authoring.md | ||
| findings.md | ||
| rules.md | ||
| running-checks.md | ||
| scopes.md | ||