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>
This commit is contained in:
James Bohnert 2023-12-26 06:06:58 -06:00 committed by GitHub
parent 1feeba92b0
commit 3ecd79f076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):