Skip to content

Commit

Permalink
Propagate crane options through gcrane cp -r (#1127) (#1222)
Browse files Browse the repository at this point in the history
Missed this when refactoring a while back. We want options to get
proagated down into the image copying logic.
  • Loading branch information
jonjohnsonjr committed Dec 28, 2021
1 parent 092caf0 commit 99fe0b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/gcrane/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ func (c *copier) copyImages(ctx context.Context, t task) error {
srcImg := fmt.Sprintf("%s@%s", t.oldRepo, t.digest)
dstImg := fmt.Sprintf("%s@%s", t.newRepo, t.digest)

return Copy(srcImg, dstImg)
return crane.Copy(srcImg, dstImg, c.opt.crane...)
}

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

if err := Copy(srcImg, dstImg); err != nil {
if err := crane.Copy(srcImg, dstImg, c.opt.crane...); err != nil {
return err
}

Expand Down

0 comments on commit 99fe0b0

Please sign in to comment.