build: options shouldn't contain "attest:" prefix

Signed-off-by: Justin Chadwell <me@jedevc.com>
pull/1469/head
Justin Chadwell 3 years ago
parent 287aaf1696
commit 6cec12e62f

@ -594,10 +594,10 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt Op
if v == nil { if v == nil {
continue continue
} }
so.FrontendAttrs[k] = *v so.FrontendAttrs["attest:"+k] = *v
} }
} }
if _, ok := opt.Attests["attest:provenance"]; !ok { if _, ok := opt.Attests["provenance"]; !ok {
so.FrontendAttrs["attest:provenance"] = "mode=min,inline-only=true" so.FrontendAttrs["attest:provenance"] = "mode=min,inline-only=true"
} }

@ -28,14 +28,13 @@ func ParseAttests(in []string) (map[string]*string, error) {
return nil, err return nil, err
} }
k := "attest:" + attestType if _, ok := out[attestType]; ok {
if _, ok := out[k]; ok {
return nil, errors.Errorf("duplicate attestation field %s", attestType) return nil, errors.Errorf("duplicate attestation field %s", attestType)
} }
if enabled { if enabled {
out[k] = &in out[attestType] = &in
} else { } else {
out[k] = nil out[attestType] = nil
} }
} }
return out, nil return out, nil

Loading…
Cancel
Save