@@ -123,6 +123,7 @@ To push the complete multi-platform image, remove the --platform flag.
123123 return err
124124 }
125125
126+ var notes []string
126127 defer func () {
127128 _ = responseBody .Close ()
128129 for _ , note := range notes {
@@ -131,18 +132,16 @@ To push the complete multi-platform image, remove the --platform flag.
131132 }()
132133
133134 if opts .quiet {
134- err = jsonstream .Display (ctx , responseBody , streams .NewOut (io .Discard ), jsonstream .WithAuxCallback (handleAux (out )))
135+ err = jsonstream .Display (ctx , responseBody , streams .NewOut (io .Discard ), jsonstream .WithAuxCallback (handleAux (& notes , out )))
135136 if err == nil {
136137 _ , _ = fmt .Fprintln (dockerCli .Out (), ref .String ())
137138 }
138139 return err
139140 }
140- return jsonstream .Display (ctx , responseBody , dockerCli .Out (), jsonstream .WithAuxCallback (handleAux (out )))
141+ return jsonstream .Display (ctx , responseBody , dockerCli .Out (), jsonstream .WithAuxCallback (handleAux (& notes , out )))
141142}
142143
143- var notes []string
144-
145- func handleAux (out tui.Output ) func (jm jsonstream.JSONMessage ) {
144+ func handleAux (notes * []string , out tui.Output ) func (jm jsonstream.JSONMessage ) {
146145 return func (jm jsonstream.JSONMessage ) {
147146 b := []byte (* jm .Aux )
148147
@@ -153,7 +152,7 @@ func handleAux(out tui.Output) func(jm jsonstream.JSONMessage) {
153152 out .Color (aec .RedF ).Apply (stripped .OriginalIndex .Digest .String ()),
154153 out .Color (aec .GreenF ).Apply (stripped .SelectedManifest .Digest .String ()),
155154 )
156- notes = append (notes , note )
155+ * notes = append (* notes , note )
157156 }
158157
159158 var missing auxprogress.ContentMissing
@@ -166,7 +165,7 @@ func handleAux(out tui.Output) func(jm jsonstream.JSONMessage) {
166165 Make sure you have all the referenced content and try again.
167166
168167 You can also push only a single platform specific manifest directly by specifying the platform you want to push with the --platform flag.`
169- notes = append (notes , note )
168+ * notes = append (* notes , note )
170169 }
171170 }
172171}
0 commit comments