summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-02-27 10:16:45 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-02-27 10:27:08 -0500
commitffefbda6943028119d43e1f5f9e4e9fb541f5e89 (patch)
tree67d6043a05e8570fb6b06ba736a6a42f9704563d /pkg/adapter/runtime.go
parent70d3cc2e73caf64fc978c1349da45c9a5551b210 (diff)
downloadpodman-ffefbda6943028119d43e1f5f9e4e9fb541f5e89.tar.gz
podman-ffefbda6943028119d43e1f5f9e4e9fb541f5e89.tar.bz2
podman-ffefbda6943028119d43e1f5f9e4e9fb541f5e89.zip
Fix build for non-Varlink-tagged Podman
Fixes #2459 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r--pkg/adapter/runtime.go8
1 files changed, 8 insertions, 0 deletions
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
+}