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:
@ -18,7 +18,8 @@ exports.handler = function() {}
|
||||
exports.builder = function(yargs) {
|
||||
yargs
|
||||
.command('logs', 'Rotate log files by closing and reopening the files', function(yargs) {
|
||||
return yargs.epilog('This command is intended to be used with the `logrotate` command.');
|
||||
return yargs.epilog('This command is intended to be used with the `logrotate` command.')
|
||||
.usage('Usage: rotate logs')
|
||||
}, function(argv) {
|
||||
maxctrl(argv, function(host){
|
||||
return doRequest(host, 'maxscale/logs/flush/', null, {method: 'POST'})
|
||||
|
Reference in New Issue
Block a user