Add explicit usage to each command
The yargs framework combined with the pkg packaging causes the executable name to be mangled on installation. For this reason, the usage should be explicitly added to each command.
This commit is contained in:
@ -128,7 +128,8 @@ exports.builder = function(yargs) {
|
||||
.command('diff <target>', 'Show difference between host servers and <target>.', function(yargs) {
|
||||
return yargs.epilog('The list of host servers is controlled with the --hosts option. ' +
|
||||
'The target server should not be in the host list. Value of <target> ' +
|
||||
'must be in HOST:PORT format');
|
||||
'must be in HOST:PORT format')
|
||||
.usage('Usage: cluster diff <target>')
|
||||
}, function(argv) {
|
||||
|
||||
maxctrl(argv, function(host) {
|
||||
@ -182,7 +183,8 @@ exports.builder = function(yargs) {
|
||||
'command on that instance. Synchronization can be attempted again if a previous ' +
|
||||
'attempt failed due to a network failure or some other ephemeral error. Any other ' +
|
||||
'errors require manual synchronization of the MaxScale configuration files and a ' +
|
||||
'restart of the failed Maxscale.');
|
||||
'restart of the failed Maxscale.')
|
||||
.usage('Usage: cluster sync <target>')
|
||||
}, function(argv) {
|
||||
maxctrl(argv, function(host) {
|
||||
return getDiffs(argv.target, host)
|
||||
|
||||
Reference in New Issue
Block a user