Skip to content

Commit

Permalink
fix: validate patched image tag (#492)
Browse files Browse the repository at this point in the history
Signed-off-by: Johnson Shi <Johnson.Shi@microsoft.com>
  • Loading branch information
johnsonshi committed Feb 1, 2024
1 parent bbd8563 commit 1017994
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/patch/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ func patchWithContext(ctx context.Context, image, reportFile, patchedTag, workin
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:%s", imageName.Name(), patchedTag)

// Ensure working folder exists for call to InstallUpdates
Expand Down

0 comments on commit 1017994

Please sign in to comment.