return SilentError if completed run failed
If `gh run watch ${ID} --exit-status` is run and "ID" is the ID of a
completed job that failed, return a SilentError. This ensures that the
program returns a non-zero code.
Fixes #3962
This commit is contained in:
parent
a6710ec506
commit
1980cc83b9
1 changed files with 3 additions and 0 deletions
|
|
@ -123,6 +123,9 @@ func watchRun(opts *WatchOptions) error {
|
|||
|
||||
if run.Status == shared.Completed {
|
||||
fmt.Fprintf(out, "Run %s (%s) has already completed with '%s'\n", cs.Bold(run.Name), cs.Cyanf("%d", run.ID), run.Conclusion)
|
||||
if opts.ExitStatus && run.Conclusion != shared.Success {
|
||||
return cmdutil.SilentError
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue