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 13:06:58 +01:00
committed by GitHub
co-authored by James Bohnert aler9
parent 1feeba92b0
commit 3ecd79f076
+5 -1
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):