Print actual command on bad command

When a bad command is given, print the actual command.
This commit is contained in:
Markus Mäkelä 2018-02-25 17:15:07 +02:00
parent 73de112ae4
commit b8df0dfc02
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -104,7 +104,7 @@ program
.demandCommand(1, 'At least one command is required')
.command('*', 'the default command', {}, function(argv) {
maxctrl(argv, function() {
return error('Unknown command. See output of `help` for a list of commands.')
return error('Unknown command ' + JSON.stringify(argv._) + '. See output of `help` for a list of commands.')
})
})