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:
@ -105,7 +105,8 @@ program
|
|||||||
.demandCommand(1, 'At least one command is required')
|
.demandCommand(1, 'At least one command is required')
|
||||||
.command('*', 'the default command', {}, function(argv) {
|
.command('*', 'the default command', {}, function(argv) {
|
||||||
maxctrl(argv, function() {
|
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.')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user