diff options
Diffstat (limited to 'pkg/adapter/runtime_remote.go')
-rw-r--r-- | pkg/adapter/runtime_remote.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go index ca2fad852..29b43e9b0 100644 --- a/pkg/adapter/runtime_remote.go +++ b/pkg/adapter/runtime_remote.go @@ -796,3 +796,15 @@ func (r *LocalRuntime) LoadImage(ctx context.Context, name string, cli *cliconfi } return names, nil } + +// IsImageNotFound checks if the error indicates that no image was found. +func IsImageNotFound(err error) bool { + if errors.Cause(err) == image.ErrNoSuchImage { + return true + } + switch err.(type) { + case *iopodman.ImageNotFound: + return true + } + return false +} |