Show help if no command is passed

This commit is contained in:
Juan Cruz Viotti 2014-12-10 13:44:56 -04:00
parent e1e7c33752
commit 06f6b47fd1
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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()