@@ -158,16 +158,17 @@ func (c *Client) ConcurrentDownloadImage(ctx context.Context, dst *os.File, arch
158158 }
159159
160160 // Check for direct OCI registry access
161- if err := c .ociDownloadImage (ctx , arch , name , tag , dst , spec , pb ); err == nil {
162- return err
163- } else if ! errors .Is (err , errOCIDownloadNotSupported ) {
164- // Return OCI download error or fallback to legacy download
165- return err
166- }
161+ if err := c .ociDownloadImage (ctx , arch , name , tag , dst , spec , pb ); err != nil {
162+ if ! errors .Is (err , errOCIDownloadNotSupported ) {
163+ // Return OCI download error or fallback to legacy download
164+ return err
165+ }
167166
168- c .Logger .Log ("Fallback to (legacy) library download" )
167+ c .Logger .Log ("Fallback to (legacy) library download" )
169168
170- return c .legacyDownloadImage (ctx , arch , name , tag , dst , spec , pb )
169+ return c .legacyDownloadImage (ctx , arch , name , tag , dst , spec , pb )
170+ }
171+ return nil
171172}
172173
173174func (c * Client ) legacyDownloadImage (ctx context.Context , arch , name , tag string , dst io.WriterAt , spec * Downloader , pb ProgressBar ) error {
0 commit comments