Skip to content

Commit 99fe0b0

Browse files
authored
Propagate crane options through gcrane cp -r (#1127) (#1222)
Missed this when refactoring a while back. We want options to get proagated down into the image copying logic.
1 parent 092caf0 commit 99fe0b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pkg/gcrane/copy.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ func (c *copier) copyImages(ctx context.Context, t task) error {
213213
srcImg := fmt.Sprintf("%s@%s", t.oldRepo, t.digest)
214214
dstImg := fmt.Sprintf("%s@%s", t.newRepo, t.digest)
215215

216-
return Copy(srcImg, dstImg)
216+
return crane.Copy(srcImg, dstImg, c.opt.crane...)
217217
}
218218

219219
// We only need to push the whole image once.
220220
tag := t.manifest.Tags[0]
221221
srcImg := fmt.Sprintf("%s:%s", t.oldRepo, tag)
222222
dstImg := fmt.Sprintf("%s:%s", t.newRepo, tag)
223223

224-
if err := Copy(srcImg, dstImg); err != nil {
224+
if err := crane.Copy(srcImg, dstImg, c.opt.crane...); err != nil {
225225
return err
226226
}
227227

0 commit comments

Comments
 (0)