buildflags: warn on duplicate attest field

Signed-off-by: Justin Chadwell <me@jedevc.com>
pull/1475/head
Justin Chadwell 2 years ago
parent df8e7d0a9a
commit f992b77535

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

Loading…
Cancel
Save