Browse Source

Merge pull request #219 from thaJeztah/18.09_backport_pull_progress_fix

[18.09 backport] builder-next: call stopprogress on download error
Tibor Vass 6 years ago
parent
commit
532777f1ec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      builder/builder-next/adapters/containerimage/pull.go

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

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