Merge pull request #219 from thaJeztah/18.09_backport_pull_progress_fix

[18.09 backport] builder-next: call stopprogress on download error
This commit is contained in:
Tibor Vass 2019-05-28 18:16:29 -07:00 committed by GitHub
commit 532777f1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -515,10 +515,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()