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

CLI invalid subcommand returns status code zero #2573

Closed
rabbah opened this issue Aug 4, 2017 · 1 comment
Closed

CLI invalid subcommand returns status code zero #2573

rabbah opened this issue Aug 4, 2017 · 1 comment

Comments

@rabbah
Copy link
Member

rabbah commented Aug 4, 2017

Reported by @ptitzler.

The error status is properly reported if the first command name is invalid. However, if an invalid subcommand is specified the returned status code is zero instead of non-zero.

$ wsk pa
Error: unknown command "pa" for "wsk"
Did you mean this?
    package
    api
Run 'wsk --help' for usage.
unknown command "pa" for "wsk"
Did you mean this?
    package
    api
$ echo $?
1
$ wsk package xxx
work with packages
Usage:
  wsk package [command]
Available Commands:
  bind        bind parameters to a package
  create      create a new package
  update      update an existing package, or create a package if it does not exist
  get         get package
  delete      delete package
  list        list all packages
  refresh     refresh package bindings
Global Flags:
      --apihost HOST         whisk API HOST
      --apiversion VERSION   whisk API VERSION
  -u, --auth KEY             authorization KEY
      --cert string          client cert
  -d, --debug                debug level output
  -i, --insecure             bypass certificate checking
      --key string           client key
  -v, --verbose              verbose output
Use "wsk package [command] --help" for more information about a command.
$ echo $?
0
@csantanapr
Copy link
Member

Issue moved to apache/incubator-openwhisk-cli #130 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants