Skip to content

Commit bb80df4

Browse files
author
Cam Tullos
committed
Fixed double help messages when no flags or operands.
1 parent 59f5c99 commit bb80df4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arcli.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ const shortInit = () => {
128128
const { operands = [], unknown: flags = [] } = program.parseOptions([
129129
...process.argv,
130130
]);
131+
132+
if (String(_.last(operands)).endsWith('arcli') && flags.length === 0) {
133+
reject('help');
134+
return;
135+
}
131136

132137
if (flags.find(flag => flag === '-h' || flag === '--help')) {
133138
reject('help');

0 commit comments

Comments
 (0)