Skip to content

Commit f4691cd

Browse files
committed
Match on catalog ref instead of source for community warning
Compare catalog.Ref directly against CommunityRegistryCatalogRef instead of pattern-matching the source field.
1 parent adffa04 commit f4691cd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/catalog_next/pull.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@ func Pull(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string
2929

3030
fmt.Printf("Catalog %s pulled\n", catalog.Ref)
3131

32-
if isCommunityRegistry(catalog.Source) {
32+
if catalog.Ref == CommunityRegistryCatalogRef {
3333
fmt.Fprintf(os.Stderr, "\n⚠️ Community Registry servers are not vetted by Docker.\n")
3434
}
3535

3636
success = true
3737
return nil
3838
}
3939

40-
// isCommunityRegistry checks if the catalog source matches the known community registry OCI reference.
41-
func isCommunityRegistry(source string) bool {
42-
return source == SourcePrefixOCI+"mcp/community-registry:latest"
43-
}
44-
4540
func pullCatalog(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string) (*db.Catalog, error) {
4641
ref, err := name.ParseReference(refStr)
4742
if err != nil {

0 commit comments

Comments
 (0)