mirror of https://github.com/docker/buildx.git
Merge pull request #2777 from LaurentGoderre/metadata-list-support
Add ability to output json lists in metadata build file
This commit is contained in:
commit
6caa151e98
|
@ -763,9 +763,12 @@ func decodeExporterResponse(exporterResponse map[string]string) map[string]inter
|
|||
}
|
||||
var raw map[string]interface{}
|
||||
if err = json.Unmarshal(dt, &raw); err != nil || len(raw) == 0 {
|
||||
var rawList []map[string]interface{}
|
||||
if err = json.Unmarshal(dt, &rawList); err != nil || len(rawList) == 0 {
|
||||
out[k] = v
|
||||
continue
|
||||
}
|
||||
}
|
||||
out[k] = json.RawMessage(dt)
|
||||
}
|
||||
return out
|
||||
|
|
Loading…
Reference in New Issue