Skip to content

status cannot be told apart from a failure by exit code #30

Description

@lefoulkrod

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions