Skip to content

Commit

Permalink
RunOn.. commands - Propagate errors in restart configurations (#2828)
Browse files Browse the repository at this point in the history
* RunOnX commands - Propagate errors in restart configurations

* apply gofmt

---------

Co-authored-by: James Bohnert <[email protected]>
Co-authored-by: aler9 <[email protected]>
  • Loading branch information
3 people authored Dec 26, 2023
1 parent 1feeba9 commit 3ecd79f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/externalcmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3ecd79f

Please sign in to comment.