Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parsing error in --only for cosign copy #4049

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

bobcallaway
Copy link
Member

@bobcallaway bobcallaway commented Feb 6, 2025

If the --only option was omitted, the default tagSet became []string{""} which is strictly not []string{}... and parsing fails.

This switches the command line arg over to StringSliceVar and adds unit tests.

Fixes: #4048

Signed-off-by: Bob Callaway <[email protected]>
@bobcallaway bobcallaway requested a review from a team as a code owner February 6, 2025 14:07
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.89%. Comparing base (2ef6022) to head (25e9c4f).
Report is 297 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/options/copy.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4049      +/-   ##
==========================================
- Coverage   40.10%   36.89%   -3.22%     
==========================================
  Files         155      209      +54     
  Lines       10044    13352    +3308     
==========================================
+ Hits         4028     4926     +898     
- Misses       5530     7799    +2269     
- Partials      486      627     +141     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Bob Callaway <[email protected]>
@bobcallaway bobcallaway merged commit c4299b1 into sigstore:main Feb 6, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cosign copy command requires "--only" since 2.4.2
2 participants