Merge pull request #992 from tonistiigi/bake-metadata-fix

bake: restore consistent output for metadata
pull/993/head
CrazyMax 3 years ago committed by GitHub
commit a7fba7bf3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -150,14 +150,7 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions) (err error
return wrapBuildError(err, true) return wrapBuildError(err, true)
} }
if len(in.metadataFile) > 0 && resp != nil { if len(in.metadataFile) > 0 {
if len(resp) == 1 {
for _, r := range resp {
if err := writeMetadataFile(in.metadataFile, decodeExporterResponse(r.ExporterResponse)); err != nil {
return err
}
}
} else {
dt := make(map[string]interface{}) dt := make(map[string]interface{})
for t, r := range resp { for t, r := range resp {
dt[t] = decodeExporterResponse(r.ExporterResponse) dt[t] = decodeExporterResponse(r.ExporterResponse)
@ -166,7 +159,6 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions) (err error
return err return err
} }
} }
}
return err return err
} }

Loading…
Cancel
Save