You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/22 00:42:05 UTC

[GitHub] csantanapr opened a new issue #130: CLI invalid subcommand returns status code zero

csantanapr opened a new issue #130: CLI invalid subcommand returns status code zero
URL: https://github.com/apache/incubator-openwhisk-cli/issues/130
 
 
   @rabbah commented on [Thu Aug 03 2017](https://github.com/apache/incubator-openwhisk/issues/2573)
   
   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
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services