Skip to content

Commit

Permalink
feat: log exit code when exec exits
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed May 22, 2024
1 parent e57e2b4 commit 017c7ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func StartAndWait(ctx context.Context, le *logrus.Entry, ecmd *exec.Cmd) error {
<-outErr
return ctx.Err()
case err := <-outErr:
le := le.WithField("exit-code", ecmd.ProcessState.ExitCode())
if err != nil {
le.WithError(err).Debug("process exited with error")
} else {
Expand Down

0 comments on commit 017c7ec

Please sign in to comment.