Skip to content

Commit

Permalink
Merge pull request #249 from depot/merge-manifest-errors
Browse files Browse the repository at this point in the history
Capture and report errors when merging manifests
  • Loading branch information
jacobwgillespie authored Feb 21, 2024
2 parents 6f18158 + 86552cf commit 51952a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/buildx/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
}

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

for _, r := range res {
Expand Down Expand Up @@ -1257,7 +1257,17 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
}
}
return nil
}

var mergeErr error
progress.Write(pw, fmt.Sprintf("merging manifest list %s", pushNames), func() error {
mergeErr = mergeManifestList()
return mergeErr
})

if mergeErr != nil {
return mergeErr
}
}
return nil
})
Expand Down

0 comments on commit 51952a4

Please sign in to comment.