gh run watch currently waits for a workflow run to finish, even when a job has already failed and other jobs are still running. When watching for a successful result, it would be useful to return as soon as failure is known.
Please consider adding --fail-fast, similar to the existing option on gh pr checks --watch.
Proposed behavior:
- Stop watching as soon as a job in the selected run fails, including when a failed job is detected on the initial check.
- Stop only the local watcher; do not cancel the workflow or its remaining jobs.
- Preserve
--exit-status as the control for returning a nonzero exit code on failure. With --fail-fast --exit-status, exit nonzero when the failed job is detected.
- Leave existing behavior unchanged when
--fail-fast is omitted.
gh run watchcurrently waits for a workflow run to finish, even when a job has already failed and other jobs are still running. When watching for a successful result, it would be useful to return as soon as failure is known.Please consider adding
--fail-fast, similar to the existing option ongh pr checks --watch.Proposed behavior:
--exit-statusas the control for returning a nonzero exit code on failure. With--fail-fast --exit-status, exit nonzero when the failed job is detected.--fail-fastis omitted.