Fix error message when no command is given
The error message when no commad was given referred to the unknown command [""]. Due to the way the command was printed, it was quite confusing.
This commit is contained in:
parent
42c468ff16
commit
8b5221e13a
@ -105,7 +105,8 @@ program
|
||||
.demandCommand(1, 'At least one command is required')
|
||||
.command('*', 'the default command', {}, function(argv) {
|
||||
maxctrl(argv, function() {
|
||||
return error('Unknown command ' + JSON.stringify(argv._) + '. See output of `help` for a list of commands.')
|
||||
msg = argv._.length == 0 ? 'No command given' : 'Unknown command ' + JSON.stringify(argv._)
|
||||
return error(msg + '. See output of `help` for a list of commands.')
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user