notation
notation copied to clipboard
Notation should not return exit code 0 for failed commands
What is the areas you experience the issue in?
Notation CLI
What is not working as expected?
I'm updating a script to use the latest weekly dev build for evaluation (https://github.com/notaryproject/notation/releases/tag/v0.12.0-beta.1.dev.20221127)
Previously, I was able to use the command
notation key add ~/.config/notation/localkeys/$REGISTRY.key ~/.config/notation/localkeys/$REGISTRY.crt --name $REGISTRY
This has changed, which is okay, and is something I need to update on my side. When I updated it, I had an error, but notation succeeded anyway, causing my script to move continue when it should not have
What did you expect to happen?
I expected exit code 1 (or something other than 0) when a command is not properly matched
How can we reproduce it?
@noelbundick-msft ➜ /workspaces/pipeline $ notation key TYPOHERE
Manage keys used for signing
Usage:
notation key [command]
Available Commands:
add Add key to signing key list
delete Delete key from signing key list
list List keys used for signing
update Update key in signing key list
Flags:
-h, --help help for key
Use "notation key [command] --help" for more information about a command.
@noelbundick-msft ➜ /workspaces/pipeline $ echo $?
0
Describe your environment
https://github.com/notaryproject/notation/releases/download/v0.12.0-beta.1.dev.20221127/notation_0.12.0-beta.1.dev.20221127_linux_amd64.tar.gz in GitHub Codespaces, in bash
What is the version of your Notation CLI or Notation Library?
Notation: Notary v2, A tool to sign, store, and verify artifacts.
Version: 0.12.0-beta.1.dev.20221127 Go version: go1.19.3 Git commit: 53052a9de2b36ae743a2978810617ed73e83943f