Skip to content

gh run view: "--exit-status" not respected when passed with other flags #12674

@ariyonaty

Description

@ariyonaty

Describe the bug

When passing --exit-status alongside other flags to gh run view, the exit status code is not respected.

Affected version

gh version 2.83.2 (2025-12-10)
https://github.com/cli/cli/releases/tag/v2.83.2

Steps to reproduce the behavior

  1. Capture run id of failed github action
  2. Run: gh run view $RUN_ID --exit-status
  3. Follow up with echo $? and observe the non-zero status code.
  4. With the same run id, add flag like: gh run view $RUN_ID --exit-status --log-failed
  5. An echo $? will show a successful status code.

Expected vs actual behavior

Command should exit with non-zero status code if run failed whether or not other flags are passed.

Pinned by williammartin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-runrelating to the gh run commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions