-
Notifications
You must be signed in to change notification settings - Fork 84
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
Improve error messages for notation CLI #128
Comments
We should get better error messages as a result of moving to cobra, but should evaluate the experience of error messages after the PR merges #255 |
Let's also in this improvement make sure the CLIs exit with proper exit code (non zero for failures) https://github.com/urfave/cli/blob/master/docs/v2/manual.md#exit-code |
Some examples of inappropriate errors: Missing trustpolicy.json file
Empty trustpolicy.json file
trustpolicy.json file content:
|
@priteshbandi Is there any concern/suggestion regarding this error message? Since user needs to manually set up the trustpolicy.json file in current notation version, I think we need to explicitly print out the path when the file is missing. |
This PR adds more logs to the library and improves error messages. This PR intends to resolve following issues: notaryproject/notation#462 notaryproject/notation#128 -> comments related to trust policy Signed-off-by: Patrick Zheng <[email protected]>
Closing this issue as it's resolved. |
Reopening as are still inappropriate error messages
|
@priteshbandi Is this issue solved by PR notaryproject/notation-go#236? |
@priteshbandi could you confirm whether this issue was solved and released in rc.2? Thanks. |
Test result with notation rc2 build
|
Apart from below error everything looks to be fixed
IMO the error message |
This PR improves the error message for a missing trustpolicy file [notaryproject/notation/#128](notaryproject/notation#128 (comment)). This is the output when the trustpolicy is missing: ``` c889f3b9d811:notation kodysk$ ./bin/notation verify $IMAGE Error: Trust policy is not present, please create trust policy at /Users/kodysk/Library/Application Support/notation/trustpolicy.json ``` Signed-off-by: Kody Kimberl [email protected]
Linked to error message improvements work planned in v1.2.0, #824. |
Test result with Notation CLI v1.2.0-beta.1:
|
Closing as this issue has been completed. |
Some examples:
Perhaps flesh this out more with examples, similar to az cli
The text was updated successfully, but these errors were encountered: