Procházet zdrojové kódy

Merge pull request #39211 from tonistiigi/pull-progress-fix

builder-next: call stopprogress on download error
Sebastiaan van Stijn před 6 roky
rodič
revize
77a42751d2

+ 1 - 1
builder/builder-next/adapters/containerimage/pull.go

@@ -545,10 +545,10 @@ func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) {
 
 	r := image.NewRootFS()
 	rootFS, release, err := p.is.DownloadManager.Download(ctx, *r, runtime.GOOS, layers, pkgprogress.ChanOutput(pchan))
+	stopProgress()
 	if err != nil {
 		return nil, err
 	}
-	stopProgress()
 
 	ref, err := p.is.CacheAccessor.GetFromSnapshotter(ctx, string(rootFS.ChainID()), cache.WithDescription(fmt.Sprintf("pulled from %s", p.ref)))
 	release()