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:
Kir Kolyshkin 2019-08-06 18:15:42 -07:00 committed by Sebastiaan van Stijn
parent 21c2f0e656
commit ac827a7fff
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -78,9 +78,9 @@ func patchImageConfig(dt []byte, dps []digest.Digest, history []ocispec.History,
}
if cache != nil {
dt, err := json.Marshal(cache)
dt, err = json.Marshal(cache)
if err != nil {
return nil, err
return nil, errors.Wrap(err, "failed to marshal cache")
}
m["moby.buildkit.cache.v0"] = dt
}