Skip to content

Commit

Permalink
Fix copy --only for signatures + update/align docs
Browse files Browse the repository at this point in the history
See
https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/copy/copy.go#L192
requires to have value `sig` instead of `sign`.

Also aligned the option docs order to align with the order of the
example. https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/copy.go#L40
  • Loading branch information
marcofranssen committed Oct 11, 2024
1 parent a0752eb commit 551b039
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cosign/cli/copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func parseOnlyOpt(onlyFlag string, sigOnly bool) []tagMap {

if sigOnly {
fmt.Fprintf(os.Stderr, "--sig-only is deprecated, use --only=sig instead")
tagSet.Insert("sign")
tagSet.Insert("sig")
}

if tagSet.Has("sig") {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cosign/cli/options/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (o *CopyOptions) AddFlags(cmd *cobra.Command) {
o.Registry.AddFlags(cmd)

cmd.Flags().StringVar(&o.CopyOnly, "only", "",
"custom string array to only copy specific items, this flag is comma delimited. ex: --only=sbom,sign,att")
"custom string array to only copy specific items, this flag is comma delimited. ex: --only=sig,att,sbom")

cmd.Flags().BoolVar(&o.SignatureOnly, "sig-only", false,
"[DEPRECATED] only copy the image signature")
Expand Down

0 comments on commit 551b039

Please sign in to comment.