From 0bd43aa1dc505b096f81f9e7cc7a42579185b5ca Mon Sep 17 00:00:00 2001 From: ktock Date: Sat, 21 Nov 2020 15:05:12 +0900 Subject: [PATCH] Check remote snapshot availability only for stargz Signed-off-by: ktock --- cache/refs.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cache/refs.go b/cache/refs.go index 2b25235e..2a8aeb30 100644 --- a/cache/refs.go +++ b/cache/refs.go @@ -399,8 +399,10 @@ func (sr *immutableRef) Extract(ctx context.Context, s session.Group) (rerr erro ctx = winlayers.UseWindowsLayerMode(ctx) } - if _, err := sr.prepareRemoteSnapshots(ctx, sr.descHandlers); err != nil { - return err + if sr.cm.Snapshotter.Name() == "stargz" { + if _, err := sr.prepareRemoteSnapshots(ctx, sr.descHandlers); err != nil { + return err + } } return sr.extract(ctx, sr.descHandlers, s)