Skip to content

Commit

Permalink
Print stdout in case of a command error
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Aug 16, 2024
1 parent 0858abd commit 6636aec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cmd/integration-tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ func executeCommand(command string, args []string, taskDescription string) {
cmd := exec.Command(command, args...)
var stderr bytes.Buffer
cmd.Stderr = &stderr
var stdout bytes.Buffer
cmd.Stdout = &stdout
if err := cmd.Run(); err != nil {
log.Fatalf("Error: %s\n", stderr.String())
log.Fatalf("stderr: %s\n\nstdout:%s\n", stderr.String(), stdout.String())
}
}

Expand Down

0 comments on commit 6636aec

Please sign in to comment.