status exits 1 for every outcome that is not "running", and a genuine error also exits 1. A script cannot tell "stopped" from "broken" without parsing stdout, which is most of the reason to have an exit code at all.
$ omnideck status --json --name desktop # installed, container missing
1
$ omnideck status --json # nothing installed at all
1
The first printed a full status payload. The second printed {"error":{"code":"NOT_INSTALLED",...}}. Same code.
Suggestion
Keep the predicate behaviour that makes if omnideck status; then read well, but separate the meanings:
0 — running
1 — not running, and the payload says why
2 — could not answer the question (no engine, no instance, runtime unreachable)
That keeps every existing shell idiom working while letting a script branch without a JSON parser.
Related: whatever is decided here belongs in the JSON mode spec (#29).
statusexits1for every outcome that is not "running", and a genuine error also exits1. A script cannot tell "stopped" from "broken" without parsing stdout, which is most of the reason to have an exit code at all.The first printed a full status payload. The second printed
{"error":{"code":"NOT_INSTALLED",...}}. Same code.Suggestion
Keep the predicate behaviour that makes
if omnideck status; thenread well, but separate the meanings:0— running1— not running, and the payload says why2— could not answer the question (no engine, no instance, runtime unreachable)That keeps every existing shell idiom working while letting a script branch without a JSON parser.
Related: whatever is decided here belongs in the JSON mode spec (#29).