Skip to content

Commit

Permalink
[supervisor] don't swallow supervisor exit error
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh authored and roboquat committed Nov 14, 2022
1 parent bf6b080 commit 03aae67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/supervisor/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ var initCmd = &cobra.Command{

err := runCommand.Wait()
if err != nil && !(strings.Contains(err.Error(), "signal: interrupt") || strings.Contains(err.Error(), "no child processes")) {
if eerr, ok := err.(*exec.ExitError); ok && eerr.ExitCode() != 0 {
log.WithError(err).Fatal("supervisor run error with unexpected exit code")
}
log.WithError(err).Error("supervisor run error")
return
}
Expand Down

0 comments on commit 03aae67

Please sign in to comment.