Skip to content

Commit 6dddd61

Browse files
committed
Fix help text on process name
1 parent 450a9cd commit 6dddd61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
const path = require('path');
23
const yargs = require('yargs');
34
const chalk = require('chalk');
45

@@ -39,6 +40,10 @@ const args = yargs
3940
4041
Add --help after any command to see more detail`);
4142

43+
// When executed as a binary package (via pkg), we need to fix yarg's process name for help text
44+
if (process.pkg)
45+
args.$0 = path.basename(process.argv0);
46+
4247
try {
4348
args.parse();
4449
} catch (err) {

0 commit comments

Comments
 (0)