Skip to content

Commit f15e7fb

Browse files
committed
fix: return error if build tool fails
A change was made to return an error if running a code-based tool fails. This should also happen if building the tool fails. Signed-off-by: Donnie Adams <[email protected]>
1 parent c3a3279 commit f15e7fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/engine/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ func (e *Engine) runCommand(ctx Context, tool types.Tool, input string, toolCate
124124
}
125125
cmd, stop, err := e.newCommand(ctx.Ctx, extraEnv, tool, input, true)
126126
if err != nil {
127-
if toolCategory == NoCategory {
127+
if toolCategory == NoCategory && ctx.Parent != nil {
128128
return fmt.Sprintf("ERROR: got (%v) while parsing command", err), nil
129129
}
130-
return "", err
130+
return "", fmt.Errorf("got (%v) while parsing command", err)
131131
}
132132
defer stop()
133133

0 commit comments

Comments
 (0)