diff options
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r-- | pkg/adapter/runtime.go | 8 |
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 +} |