mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-07 19:34:13 +00:00
Show help if no command is passed
This commit is contained in:
parent
e1e7c33752
commit
06f6b47fd1
@ -58,4 +58,3 @@ This should ideally be part of `gulp`, however there doesn't seems to be any plu
|
||||
|
||||
- Some interactive widgets don't work on [Cygwin](https://cygwin.com/). If you're running Windows, it's preferrable that you use `cmd.exe`.
|
||||
- Most commands require an `<id>` argument, however [Commander](https://github.com/tj/commander.js) refuses to show that in the help page. This will be fixed soon.
|
||||
- If you make a typo when writing a command, or run the app without any command, nothing is shown. This will be fixed soon.
|
||||
|
@ -87,9 +87,14 @@ exports.addResource = (options = {}) ->
|
||||
|
||||
exports.parse = (argv) ->
|
||||
|
||||
# Matches unknown commands
|
||||
exports.addCommand
|
||||
command: '*'
|
||||
action: ->
|
||||
program.outputHelp()
|
||||
|
||||
program.parse(argv)
|
||||
|
||||
# Show help if no command is passed
|
||||
if _.isEmpty(program.args)
|
||||
program.outputHelp()
|
||||
|
Loading…
x
Reference in New Issue
Block a user