builder-next/patchImageConfig: nitpicks
1. Do not introduce another dt variable. 2. Wrap the error similar to all the others. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
21c2f0e656
commit
ac827a7fff
|
@ -78,9 +78,9 @@ func patchImageConfig(dt []byte, dps []digest.Digest, history []ocispec.History,
|
||||||
}
|
}
|
||||||
|
|
||||||
if cache != nil {
|
if cache != nil {
|
||||||
dt, err := json.Marshal(cache)
|
dt, err = json.Marshal(cache)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, errors.Wrap(err, "failed to marshal cache")
|
||||||
}
|
}
|
||||||
m["moby.buildkit.cache.v0"] = dt
|
m["moby.buildkit.cache.v0"] = dt
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue