From 7e8b266315604915dfdd5c84f5cc9f30f2ba95c2 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 18 Oct 2022 16:08:48 +0100 Subject: [PATCH] fix: Ensure docker daemon skopeo logging is output on error Previously only the registry inspect output was emitted, but to diagnose certain issues the connection to docker dameon should also be included in error logs. --- cmd/mindthegap/create/imagebundle/image_bundle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mindthegap/create/imagebundle/image_bundle.go b/cmd/mindthegap/create/imagebundle/image_bundle.go index 1df2b515..21ebba4f 100644 --- a/cmd/mindthegap/create/imagebundle/image_bundle.go +++ b/cmd/mindthegap/create/imagebundle/image_bundle.go @@ -155,6 +155,8 @@ func NewCommand(out output.Output) *cobra.Command { context.Background(), fmt.Sprintf("%s%s", srcSkopeoScheme, srcImageName), ) + skopeoStdout = append(skopeoStdout, skopeoDaemonStdout...) + skopeoStderr = append(skopeoStderr, skopeoDaemonStderr...) if err != nil { out.EndOperation(false) out.Infof("---skopeo stdout---:\n%s", skopeoStdout) @@ -162,8 +164,6 @@ func NewCommand(out output.Output) *cobra.Command { return err } srcImageManifestList = srcDaemonImageManifestList - skopeoStdout = append(skopeoStdout, skopeoDaemonStdout...) - skopeoStderr = append(skopeoStderr, skopeoDaemonStderr...) } out.V(4).Infof("---skopeo stdout---:\n%s", skopeoStdout) out.V(4).Infof("---skopeo stderr---:\n%s", skopeoStderr)