mirror of
https://github.com/containers/skopeo.git
synced 2025-08-30 21:25:11 +00:00
Also exit with status 2 for missing tags in oci-archive:
No tests because we aren't testing oci-archive: anywhere else either. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
634c0d99f3
commit
99c6fb09e9
@ -13,6 +13,7 @@ import (
|
||||
"github.com/containers/common/pkg/retry"
|
||||
"github.com/containers/image/v5/directory"
|
||||
"github.com/containers/image/v5/manifest"
|
||||
ociarchive "github.com/containers/image/v5/oci/archive"
|
||||
ocilayout "github.com/containers/image/v5/oci/layout"
|
||||
"github.com/containers/image/v5/pkg/compression"
|
||||
"github.com/containers/image/v5/storage"
|
||||
@ -420,9 +421,11 @@ func promptForPassphrase(privateKeyFile string, stdin, stdout *os.File) (string,
|
||||
// TODO drive this into containers/image properly
|
||||
func isNotFoundImageError(err error) bool {
|
||||
var layoutImageNotFoundError ocilayout.ImageNotFoundError
|
||||
var archiveImageNotFoundError ociarchive.ImageNotFoundError
|
||||
return isDockerManifestUnknownError(err) ||
|
||||
errors.Is(err, storage.ErrNoSuchImage) ||
|
||||
errors.As(err, &layoutImageNotFoundError)
|
||||
errors.As(err, &layoutImageNotFoundError) ||
|
||||
errors.As(err, &archiveImageNotFoundError)
|
||||
}
|
||||
|
||||
// isDockerManifestUnknownError is a copy of code from containers/image,
|
||||
|
Loading…
Reference in New Issue
Block a user