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 {
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"
}

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

Loading…
Cancel
Save