From e18f16e6883eaff3c90681c24eae751f7734b00f Mon Sep 17 00:00:00 2001 From: Vikyath Harekal Date: Wed, 11 Dec 2024 12:32:34 +0000 Subject: [PATCH] feat: [CDE-553]: concat skopeo stdout and stderr output (#3149) * feat: [CDE-553]: concat output --- .../orchestrator/container/devcontainer_container_utils.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/gitspace/orchestrator/container/devcontainer_container_utils.go b/app/gitspace/orchestrator/container/devcontainer_container_utils.go index ec98cfe18..2ea2871ab 100644 --- a/app/gitspace/orchestrator/container/devcontainer_container_utils.go +++ b/app/gitspace/orchestrator/container/devcontainer_container_utils.go @@ -410,18 +410,17 @@ func CopyImage( gitspaceLogger.Info("Executing image copy command: " + cmd.String()) cmdErr := cmd.Run() - // Log command output response, err := io.ReadAll(&outBuf) if err != nil { return logStreamWrapError(gitspaceLogger, "Error while reading image output", err) } gitspaceLogger.Info("Image copy output: " + string(response)) - errResponse, err := io.ReadAll(&errBuf) if err != nil { return logStreamWrapError(gitspaceLogger, "Error while reading image output", err) } - gitspaceLogger.Error("Image copy error output: "+string(errResponse), nil) + combinedOutput := string(response) + "\n" + string(errResponse) + gitspaceLogger.Info("Image copy combined output: " + combinedOutput) if cmdErr != nil { return logStreamWrapError(gitspaceLogger, "Error while pulling image using skopeo", cmdErr)