Skip to content

Commit

Permalink
fix(stderr): adding the fix for cmd.Exec considers log.info as stderr (
Browse files Browse the repository at this point in the history
…#632)

Signed-off-by: Shubham Chaudhary <[email protected]>

Signed-off-by: Shubham Chaudhary <[email protected]>
  • Loading branch information
ispeakc0de authored Jan 10, 2023
1 parent d151c8f commit 2134933
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/utils/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ func Exec(commandDetails *PodDetails, clients clients.ClientSets, command []stri
return "", cerrors.Error{ErrorCode: cerrors.ErrorTypeGeneric, Reason: fmt.Sprintf("failed to create a stderr and stdout stream, %s", err.Error())}
}

if strings.TrimSpace(stderr.String()) != "" {
return "", cerrors.Error{ErrorCode: cerrors.ErrorTypeGeneric, Reason: stderr.String()}
}

return stdout.String(), nil
}

Expand Down

0 comments on commit 2134933

Please sign in to comment.