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:
@ -41,14 +41,16 @@ exports.builder = function(yargs) {
|
||||
'linked to a service, it should be linked to a monitor so that ' +
|
||||
'the server state is up to date. Newly linked server are only ' +
|
||||
'available to new connections, existing connections will use the ' +
|
||||
'old list of servers.');
|
||||
'old list of servers.')
|
||||
.usage('Usage: link service <name> <server...>')
|
||||
}, function(argv) {
|
||||
addServer(argv, 'services/' + argv.name, argv.server)
|
||||
})
|
||||
.command('monitor <name> <server...>', 'Link servers to a monitor', function(yargs) {
|
||||
return yargs.epilog('Linking a server to a monitor will add it to the list of servers ' +
|
||||
'that are monitored by that monitor. A server can be monitored by ' +
|
||||
'only one monitor at a time.');
|
||||
'only one monitor at a time.')
|
||||
.usage('Usage: link monitor <name> <server...>')
|
||||
}, function(argv) {
|
||||
addServer(argv, 'monitors/' + argv.name, argv.server)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user