Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsugara22 committed Nov 13, 2024
1 parent 20a93e7 commit f729eab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/patch/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@ func patchWithContext(ctx context.Context, ch chan error, image, reportFile, pat
var tag string
taggedName, ok := imageName.(reference.Tagged)
if ok {
tag = taggedName.Tag()
tag = taggedName.Tag()
} else {
log.Warnf("Image name has no tag")
}
log.Warnf("Image name has no tag")
}
if patchedTag == "" {
if tag == "" {
log.Warnf("No output tag specified for digest-referenced image, defaulting to `%s`", defaultPatchedTagSuffix)
patchedTag = defaultPatchedTagSuffix
} else {
patchedTag = fmt.Sprintf("%s-%s", tag, defaultPatchedTagSuffix)
}
if tag == "" {
log.Warnf("No output tag specified for digest-referenced image, defaulting to `%s`", defaultPatchedTagSuffix)
patchedTag = defaultPatchedTagSuffix
} else {
patchedTag = fmt.Sprintf("%s-%s", tag, defaultPatchedTagSuffix)
}
}
_, err = reference.WithTag(imageName, patchedTag)
if err != nil {
return fmt.Errorf("%w with patched tag %s", err, patchedTag)
}
patchedImageName := fmt.Sprintf("%s@sha256:%s", imageName.Name(), digest)
patchedImageName := fmt.Sprintf("%s:%s", imageName.Name(), patchedTag)

// Ensure working folder exists for call to InstallUpdates
if workingFolder == "" {
Expand Down Expand Up @@ -136,7 +136,7 @@ func patchWithContext(ctx context.Context, ch chan error, image, reportFile, pat

bkClient, err := buildkit.NewClient(ctx, bkOpts)
if err != nil {
return err
return err
}
defer bkClient.Close()

Expand Down

0 comments on commit f729eab

Please sign in to comment.