Skip to content

Commit 03aae67

Browse files
mustard-mhroboquat
authored andcommitted
[supervisor] don't swallow supervisor exit error
1 parent bf6b080 commit 03aae67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/supervisor/cmd/init.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ var initCmd = &cobra.Command{
6060

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

0 commit comments

Comments
 (0)