From 6e8ced1e73f091bf5ebe5b29f32df401c48ab2c4 Mon Sep 17 00:00:00 2001 From: John Montroy Date: Wed, 5 May 2021 14:01:44 -0400 Subject: [PATCH] fix: include stdout and stderr in all Exec returns. --- internal/app/command.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/app/command.go b/internal/app/command.go index 76a69695..7116b440 100644 --- a/internal/app/command.go +++ b/internal/app/command.go @@ -102,11 +102,10 @@ func (c *Command) Exec() (ExitStatus, error) { } if err != nil { res.code = 1 - err = fmt.Errorf("failed to run %s: %w", c.Description, err) if exiterr, ok := err.(*exec.ExitError); ok { res.code = exiterr.ExitCode() - err = c.newExitError(exiterr.ExitCode(), stdout, stderr, err) } + err = c.newExitError(res.code, stdout, stderr, err) } return res, err }