From 6636aec7029bef339d911f8353b29e07580ff38c Mon Sep 17 00:00:00 2001 From: Paulin Todev Date: Fri, 16 Aug 2024 11:14:02 +0100 Subject: [PATCH] Print stdout in case of a command error --- internal/cmd/integration-tests/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/cmd/integration-tests/utils.go b/internal/cmd/integration-tests/utils.go index 57abd33f5c41..262aef69f971 100644 --- a/internal/cmd/integration-tests/utils.go +++ b/internal/cmd/integration-tests/utils.go @@ -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()) } }