notaryproject / notation

A CLI tool to sign and verify artifacts
https://notaryproject.dev/
Apache License 2.0
306 stars 84 forks source link

fix: improve error message for --signature-format flag #925

Closed JeyJeyGao closed 2 months ago

JeyJeyGao commented 2 months ago

Previous error message:

$ notation sign localhost:5000/hello-app:v1 --plugin azure-kv --id https://x.vault.azure.net/certificates/self-signed-pem/xxx --signature-format xxx
Error: signature format "xxx" not supported

Improved error message:

$ notation sign localhost:5000/hello-app:v1 --plugin azure-kv --id https://x.vault.azure.net/certificates/self-signed-pem/xxx --signature-format xxx
Error: signature format "xxx" not supported
Please use the supported signature envelope format "jws" or "cose"

Test(not related to the fix):

Resolves #868 Signed-off-by: Junjie Gao junjiegao@microsoft.com

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.91%. Comparing base (eaa5fb4) to head (9facfa5). Report is 23 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #925 +/- ## ========================================== + Coverage 64.93% 70.91% +5.98% ========================================== Files 45 45 Lines 2729 2166 -563 ========================================== - Hits 1772 1536 -236 + Misses 795 440 -355 - Partials 162 190 +28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.