Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit b54d9d7

Browse files
committed
Merge pull request #14 from uber/tidy-help-text
Tidy help text
2 parents 697f341 + ee1bce3 commit b54d9d7

File tree

10 files changed

+23
-22
lines changed

10 files changed

+23
-22
lines changed

checksums.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ function main() {
2929
program
3030
.description('Prints membership checksums')
3131
.option('--tchannel-v1')
32-
.usage('[options] <address>');
32+
.usage('[options] <hostport or bootstrapfile>');
3333
program.parse(process.argv);
3434

3535
var address = program.args[0];
3636

3737
if (!address) {
38-
console.error('Error: hostport is required');
38+
console.error('Error: hostport or bootstrapfile is required');
3939
process.exit(1);
4040
}
4141

count.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ function main() {
3131
.option('-m --members', 'Count of members')
3232
.option('-p --partitions', 'Count of partitions')
3333
.option('--tchannel-v1')
34-
.usage('[options] <hostport>');
34+
.usage('[options] <hostport or bootstrapfile>');
3535
program.parse(process.argv);
3636

3737
var coord = program.args[0];
3838

3939
if (!coord) {
40-
console.error('Error: hostport is required');
40+
console.error('Error: hostport or path to bootstrap file is required');
4141
process.exit(1);
4242
}
4343

dist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function main() {
3737
var hostPort = program.args[0];
3838

3939
if (!hostPort) {
40-
console.error('hostport is required');
40+
console.error('Error: hostport is required');
4141
process.exit(1);
4242
}
4343

dump.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ function main() {
3030
.description('Dumps membership information to file')
3131
.option('-f --file <file>', 'File to dump to')
3232
.option('--tchannel-v1')
33-
.usage('[options] <hostport>');
33+
.usage('[options] <hostport or bootstrapfile>');
3434
program.parse(process.argv);
3535

3636
var coord = program.args[0];
3737

3838
if (!coord) {
39-
console.error('Error: hostport is required');
39+
console.error('Error: hostport or path to bootstrap file is required');
4040
process.exit(1);
4141
}
4242

join.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ function main() {
2929
program
3030
.description('Makes node (re)join cluster')
3131
.option('--tchannel-v1')
32-
.usage('[options] <address>');
32+
.usage('[options] <hostport>');
3333
program.parse(process.argv);
3434

3535
var address = program.args[0];
3636

3737
if (!address) {
38-
console.error('Error: address is required');
38+
console.error('Error: hostport is required');
3939
process.exit(1);
4040
}
4141

leave.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ function main() {
2929
program
3030
.description('Makes node leave cluster')
3131
.option('--tchannel-v1')
32-
.usage('[options] <address>');
32+
.usage('[options] <hostport>');
3333
program.parse(process.argv);
3434

3535
var address = program.args[0];
3636

3737
if (!address) {
38-
console.error('Error: address is required');
38+
console.error('Error: hostport is required');
3939
process.exit(1);
4040
}
4141

list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ function main() {
3030
.option('-h --hosts', 'List hosts')
3131
.option('-m --members', 'List members')
3232
.option('--tchannel-v1')
33-
.usage('[options] <hostport>');
33+
.usage('[options] <hostport or bootstrapfile>');
3434
program.parse(process.argv);
3535

3636
var coord = program.args[0];
3737

3838
if (!coord) {
39-
console.error('Error: hostport is required');
39+
console.error('Error: hostport or bootstrapfile is required');
4040
process.exit(1);
4141
}
4242

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"ringpop-admin-list": "./list.js",
1717
"ringpop-admin-lookup": "./lookup.js",
1818
"ringpop-admin-join": "./join.js",
19+
"ringpop-admin-partitions": "./partitions.js",
1920
"ringpop-admin-status": "./status.js",
2021
"ringpop-admin-top": "./top.js"
2122
},

parser.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var program = require('commander');
2424

2525
function assertPositionArg(program, pos, arg) {
2626
if (program.args[pos]) return;
27-
console.error('Error: ' + arg + 'is required');
27+
console.error('Error: ' + arg + ' is required');
2828
process.exit(1);
2929
}
3030

@@ -34,9 +34,9 @@ function parseReuseCommand() {
3434
.option('-m, --member <memberAddr>, Address of member to reuse')
3535
.option('-l, --limit <limit>, Parallelism limit')
3636
.option('--tchannel-v1')
37-
.usage('[options] <coordinator>');
37+
.usage('[options] <hostport or bootstrapfile>');
3838
program.parse(process.argv);
39-
assertPositionArg(program, 0, 'coordinator');
39+
assertPositionArg(program, 0, 'hostport or bootstrapfile');
4040

4141
return new commands.ReuseCommand(
4242
program.tchannelV1,
@@ -50,9 +50,9 @@ function parseStatusCommand() {
5050
program
5151
.description('Status of members in ring')
5252
.option('--tchannel-v1')
53-
.usage('[options] <coordinator>');
53+
.usage('[options] <hostport or bootstrapfile>');
5454
program.parse(process.argv);
55-
assertPositionArg(program, 0, 'coordinator');
55+
assertPositionArg(program, 0, 'hostport or bootstrapfile');
5656

5757
return new commands.StatusCommand(program.tchannelV1, program.args[0]);
5858
}
@@ -62,9 +62,9 @@ function parsePartitionCommand() {
6262
.description('Show partition information of a ring')
6363
.option('--tchannel-v1')
6464
.option('-q, --quiet', 'Don\'t print headers')
65-
.usage('[options] <coordinatorOrFile>');
65+
.usage('[options] <hostport or bootstrapfile>');
6666
program.parse(process.argv);
67-
assertPositionArg(program, 0, 'coordinatorOrFile');
67+
assertPositionArg(program, 0, 'hostport or bootstrapfile');
6868

6969
return new commands.PartitionCommand(
7070
program.tchannelV1,

top.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function main() {
5555
.option('-r, --refresh-rate <refresh-rate>', 'Refresh rate (in milliseconds). Default is 10000.')
5656
.option('-R, --no-refresh', 'Turn refresh off. top will exit immediately after first download.')
5757
.option('--tchannel-v1', 'Use TChannel v1. Default is v2.')
58-
.usage('[options] <host-port>');
58+
.usage('[options] <hostport or bootstrapfile>');
5959

6060
program.on('--help', function onHelp() {
6161
console.log(' Key bindings: ');
@@ -75,7 +75,7 @@ function main() {
7575
var coordinatorAddress = program.args[0];
7676

7777
if (!coordinatorAddress) {
78-
console.error('host-port is required');
78+
console.error('Error: hostport or bootstrapfile is required');
7979
process.exit(1);
8080
}
8181

0 commit comments

Comments
 (0)