From 91a57f3e7f5ed569f7b9d97d14de11bb324bb8e0 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 13 May 2019 17:01:13 -0700 Subject: [PATCH] builder-next: call stopprogress on download error Signed-off-by: Tonis Tiigi --- builder/builder-next/adapters/containerimage/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/builder-next/adapters/containerimage/pull.go b/builder/builder-next/adapters/containerimage/pull.go index dd9f5cf870..af8f868b8f 100644 --- a/builder/builder-next/adapters/containerimage/pull.go +++ b/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()