Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hidu committed Jul 5, 2024
1 parent ef03bdb commit 23851a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ func (c *Command) Exec(ctx context.Context, env []string) {
if err == nil {
return
}
msg := fmt.Sprintf("Exec %s failed: %s", c.Cmd, err.Error())
msg := fmt.Sprintf("Exec %s failed: %s, ExitCode=%d", c.Cmd, err.Error(), co.ExitCode())
if c.AllowFail {
msg += ", skipped"
}
fmt.Fprintln(os.Stderr, ConsoleRed(msg))
if c.Trace {
fmt.Fprintln(os.Stderr, ConsoleRed(msg))
}
if !c.AllowFail {
exitCode := co.ExitCode()
os.Exit(exitCode)
Expand Down

0 comments on commit 23851a7

Please sign in to comment.