mirror of
https://github.com/containers/skopeo.git
synced 2025-08-01 06:55:43 +00:00
Add a workaround for public.ecr.aws not implementing tag list at all
Per https://github.com/containers/skopeo/issues/1230 , and
155d0665e8/docker/errors_test.go (L88)
.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
632cebd74e
commit
9b6f5b6e75
@ -213,6 +213,16 @@ func (opts *inspectOptions) run(args []string, stdout io.Writer) (retErr error)
|
|||||||
if ok := errors.As(err, &ec); ok && ec.ErrorCode() == errcode.ErrorCodeDenied {
|
if ok := errors.As(err, &ec); ok && ec.ErrorCode() == errcode.ErrorCodeDenied {
|
||||||
fatalFailure = false
|
fatalFailure = false
|
||||||
}
|
}
|
||||||
|
// - public.ecr.aws does not implement the endpoint at all, and fails with 404:
|
||||||
|
// https://github.com/containers/skopeo/issues/1230
|
||||||
|
// This is actually "code":"NOT_FOUND", and the parser doesn’t preserve that.
|
||||||
|
// So, also check the error text.
|
||||||
|
if ok := errors.As(err, &ec); ok && ec.ErrorCode() == errcode.ErrorCodeUnknown {
|
||||||
|
var e errcode.Error
|
||||||
|
if ok := errors.As(err, &e); ok && e.Code == errcode.ErrorCodeUnknown && e.Message == "404 page not found" {
|
||||||
|
fatalFailure = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if fatalFailure {
|
if fatalFailure {
|
||||||
return fmt.Errorf("Error determining repository tags: %w", err)
|
return fmt.Errorf("Error determining repository tags: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user