Skip to content

Commit cec0e2d

Browse files
committed
Cleanup pullSchema2
Signed-off-by: Qiang Huang <[email protected]>
1 parent b468df9 commit cec0e2d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

distribution/pull_v2.go

+3-9
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,6 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
559559

560560
rootFS, release, err := p.config.DownloadManager.Download(ctx, downloadRootFS, descriptors, p.config.ProgressOutput)
561561
if err != nil {
562-
if configJSON != nil {
563-
// Already received the config
564-
return "", "", err
565-
}
566562
select {
567563
case err = <-errChan:
568564
return "", "", err
@@ -577,11 +573,9 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
577573
}
578574
defer release()
579575

580-
if configJSON == nil {
581-
configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
582-
if err != nil {
583-
return "", "", err
584-
}
576+
configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
577+
if err != nil {
578+
return "", "", err
585579
}
586580

587581
if unmarshalledConfig.RootFS == nil {

0 commit comments

Comments
 (0)