Skip to content

Commit f97d500

Browse files
author
Per Goncalves da Silva
committed
patch default policy load error handling
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 64c2a99 commit f97d500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

catalogd/internal/source/containers_image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func resolveCanonicalRef(ctx context.Context, imgRef reference.Named, imageCtx *
249249

250250
func loadPolicyContext(sourceContext *types.SystemContext, l logr.Logger) (*signature.PolicyContext, error) {
251251
policy, err := signature.DefaultPolicy(sourceContext)
252-
if os.IsNotExist(err) {
252+
if err != nil {
253253
l.Info("no default policy found, using insecure policy")
254254
policy, err = signature.NewPolicyFromBytes([]byte(`{"default":[{"type":"insecureAcceptAnything"}]}`))
255255
}

0 commit comments

Comments
 (0)