From ffefbda6943028119d43e1f5f9e4e9fb541f5e89 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 27 Feb 2019 10:16:45 -0500 Subject: Fix build for non-Varlink-tagged Podman Fixes #2459 Signed-off-by: Matthew Heon --- pkg/adapter/runtime.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/adapter/runtime.go') diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index 4f5b98dbb..8624981b1 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -333,3 +333,11 @@ func (r *LocalRuntime) LoadImage(ctx context.Context, name string, cli *cliconfi } return r.Runtime.LoadImage(ctx, name, cli.Input, writer, cli.SignaturePolicy) } + +// IsImageNotFound checks if the error indicates that no image was found. +func IsImageNotFound(err error) bool { + if errors.Cause(err) == image.ErrNoSuchImage { + return true + } + return false +} -- cgit v1.2.3-54-g00ecf