Skip to content

Commit 1143b8f

Browse files
committed
fix: log stderr as well
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
1 parent 791b29e commit 1143b8f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ func (e *CommandCustodianExecutor) Execute(ctx context.Context, req CustodianExe
261261
if err != nil {
262262
result.Err = fmt.Errorf("custodian execution failed: %w", err)
263263
result.Errors = append(result.Errors, result.Err.Error())
264+
if result.Stderr != "" {
265+
result.Errors = append(result.Errors, result.Stderr)
266+
}
264267
}
265268
if runErr := runCtx.Err(); runErr != nil {
266269
// Avoid duplicating context timeout/cancel errors when cmd.Run already

0 commit comments

Comments
 (0)