MXS-1300: Return a rejected promise for unknown commands
When an unknow command is executed, the core should return a rejected promise.
This commit is contained in:
@ -43,7 +43,9 @@ exports.builder = function(yargs) {
|
||||
})
|
||||
.usage('Usage: link <command>')
|
||||
.help()
|
||||
.command('*', 'the default command', {}, () => {
|
||||
logger.log('Unknown command. See output of `help link` for a list of commands.')
|
||||
.command('*', 'the default command', {}, function(argv) {
|
||||
maxctrl(argv, function(host) {
|
||||
return error('Unknown command. See output of `help link` for a list of commands.')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user