Browse Source

RunOn.. commands - Propagate errors in restart configurations (#2828)

* RunOnX commands - Propagate errors in restart configurations

* apply gofmt

---------

Co-authored-by: James Bohnert <jbohnert@haivision.com>
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
pull/2843/head
James Bohnert 1 year ago committed by GitHub
parent
commit
3ecd79f076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      internal/externalcmd/cmd.go

6
internal/externalcmd/cmd.go

@ -87,7 +87,11 @@ func (e *Cmd) run() { @@ -87,7 +87,11 @@ func (e *Cmd) run() {
return
}
e.onExit(fmt.Errorf("command exited with code 0"))
if err != nil {
e.onExit(err)
} else {
e.onExit(fmt.Errorf("command exited with code 0"))
}
select {
case <-time.After(restartPause):

Loading…
Cancel
Save