From a0805d6fa88326b6205752f312b522deb4ea9bba Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 23 Dec 2022 01:45:25 -0700 Subject: [PATCH] scripts: handle exec error properly Signed-off-by: Stephen Gutekanst --- internal/wrench/scripts/scripts.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/wrench/scripts/scripts.go b/internal/wrench/scripts/scripts.go index 270b98e..cc9cfe9 100644 --- a/internal/wrench/scripts/scripts.go +++ b/internal/wrench/scripts/scripts.go @@ -68,6 +68,7 @@ func ExecArgs(name string, args []string, opt ...CmdOption) Cmd { if exitError, ok := err.(*exec.ExitError); ok { return fmt.Errorf("'%s': error: exit code: %v", name, exitError.ExitCode()) } + return err } return nil }