Skip to content

Commit 86552cf

Browse files
Capture and report errors when merging manifests
1 parent 6f18158 commit 86552cf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pkg/buildx/build/build.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
11321132
}
11331133

11341134
if pushNames != "" {
1135-
progress.Write(pw, fmt.Sprintf("merging manifest list %s", pushNames), func() error {
1135+
mergeManifestList := func() error {
11361136
descs := make([]specs.Descriptor, 0, len(res))
11371137

11381138
for _, r := range res {
@@ -1257,7 +1257,17 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
12571257
}
12581258
}
12591259
return nil
1260+
}
1261+
1262+
var mergeErr error
1263+
progress.Write(pw, fmt.Sprintf("merging manifest list %s", pushNames), func() error {
1264+
mergeErr = mergeManifestList()
1265+
return mergeErr
12601266
})
1267+
1268+
if mergeErr != nil {
1269+
return mergeErr
1270+
}
12611271
}
12621272
return nil
12631273
})

0 commit comments

Comments
 (0)