Skip to content

Commit eba95ad

Browse files
committed
Update CLIs
1 parent d6c1966 commit eba95ad

File tree

2 files changed

+14
-2
lines changed
  • lib/node_modules/@stdlib/bench

2 files changed

+14
-2
lines changed

lib/node_modules/@stdlib/bench/bin/cli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,16 @@ function main() {
5959
})
6060
});
6161

62-
dir = cwd();
62+
// Get any provided command-line options:
6363
flags = cli.flags();
64+
if ( flags.help || flags.version ) {
65+
return;
66+
}
67+
68+
// Get any provided command-line arguments:
6469
args = cli.args();
6570

71+
dir = cwd();
6672
if ( flags.require ) {
6773
if ( isString( flags.require ) ) {
6874
flags.require = [ flags.require ];

lib/node_modules/@stdlib/bench/harness/bin/cli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,16 @@ function main() {
5959
})
6060
});
6161

62-
dir = cwd();
62+
// Get any provided command-line options:
6363
flags = cli.flags();
64+
if ( flags.help || flags.version ) {
65+
return;
66+
}
67+
68+
// Get any provided command-line arguments:
6469
args = cli.args();
6570

71+
dir = cwd();
6672
if ( flags.require ) {
6773
if ( isString( flags.require ) ) {
6874
flags.require = [ flags.require ];

0 commit comments

Comments
 (0)