build: fail early if trying to export index annotations with moby exporter

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-08-27 11:17:31 +02:00
parent a6e198a341
commit a8f546eea5
5 changed files with 32 additions and 4 deletions
+2 -2
View File
@@ -1544,12 +1544,12 @@ func toBuildOpt(t *Target, inp *Input) (*build.Options, error) {
return nil, err
}
annotations, err := buildflags.ParseAnnotations(t.Annotations)
bo.Annotations, err = buildflags.ParseAnnotations(t.Annotations)
if err != nil {
return nil, err
}
for _, e := range bo.Exports {
for k, v := range annotations {
for k, v := range bo.Annotations {
e.Attrs[k.String()] = v
}
}