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

Route deprecated -version to version subcommand #1854

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

puerco
Copy link
Member

@puerco puerco commented May 8, 2022

Summary

This commit fixes the routing of the deprecated -version flag to avoid translating it to --version. Instead, it routes the flag to the version subcommand, prefixing it with the deprecation warning.

Signed-off-by: Adolfo García Veytia (Puerco) puerco@chainguard.dev

Ticket Link

Fixes #1811

Release Note

The -version flag now works as other deprecated flags, patching it to the expected output and preceding it with a warning

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2022

Codecov Report

Merging #1854 (d45f1b4) into main (d7a7270) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1854   +/-   ##
=======================================
  Coverage   28.74%   28.74%           
=======================================
  Files         132      132           
  Lines        8078     8078           
=======================================
  Hits         2322     2322           
  Misses       5449     5449           
  Partials      307      307           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7a7270...d45f1b4. Read the comment docs.

@hectorj2f hectorj2f changed the title Route deprectated -version to version subcommand Route deprecated -version to version subcommand May 10, 2022
This commit fixes the routing of the deprected -version flag to avoid
translating it to --version. Instead it routes is to the `version`
subcommand.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
@puerco
Copy link
Member Author

puerco commented Jun 9, 2022

Lol, this now has officially Too Much Engineering™ for a simple fix I fixed out of rage :D

OK, should now work as expected, please PTAL @cpanato :

❯ cosign sign -help
WARNING: the -help flag is deprecated and will be removed in a future release. Please use the --help flag instead.
[...]

❯ cosign -version
WARNING: the -version flag is deprecated and will be removed in a future release. Please use the version subcommand instead.

@dlorenc dlorenc merged commit 68e8d93 into sigstore:main Jun 9, 2022
@github-actions github-actions bot added this to the v1.10.0 milestone Jun 9, 2022
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 -version' tells me to use 'cosign --version'
5 participants