mirror of
https://github.com/harness/drone.git
synced 2025-05-04 23:09:34 +08:00
feat: [CDE-553]: concat skopeo stdout and stderr output (#3149)
* feat: [CDE-553]: concat output
This commit is contained in:
parent
2f83725e12
commit
e18f16e688
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user