diff --git a/pkg/v1/google/list.go b/pkg/v1/google/list.go index cf239cc5a..d85740861 100644 --- a/pkg/v1/google/list.go +++ b/pkg/v1/google/list.go @@ -127,7 +127,7 @@ func (l *lister) list(repo name.Repository) (*Tags, error) { return nil, err } - if len(parsed.Manifests) != 0 { + if len(parsed.Manifests) != 0 || len(parsed.Children) != 0 { // We're dealing with GCR, just return directly. return &parsed, nil } diff --git a/pkg/v1/google/list_test.go b/pkg/v1/google/list_test.go index 342acc62a..5718526a4 100644 --- a/pkg/v1/google/list_test.go +++ b/pkg/v1/google/list_test.go @@ -104,6 +104,13 @@ func TestList(t *testing.T) { }, Tags: []string{"foo", "bar", "baz"}, }, + }, { + name: "just children", + responseBody: []byte(`{"child":["hello", "world"]}`), + wantErr: false, + wantTags: &Tags{ + Children: []string{"hello", "world"}, + }, }, { name: "not json", responseBody: []byte("notjson"),