Skip to content

Commit b77831c

Browse files
authored
feat: ignore bun when getting bin name
1 parent 0bc7255 commit b77831c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/yargs-factory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,9 @@ export class YargsInstance {
15521552
// ignore the node bin, specify this in your
15531553
// bin file with #!/usr/bin/env node
15541554
let default$0: string[];
1555-
if (/\b(node|iojs|electron)(\.exe)?$/.test(this.#shim.process.argv()[0])) {
1555+
if (
1556+
/\b(node|iojs|electron|bun)(\.exe)?$/.test(this.#shim.process.argv()[0])
1557+
) {
15561558
default$0 = this.#shim.process.argv().slice(1, 2);
15571559
} else {
15581560
default$0 = this.#shim.process.argv().slice(0, 1);

0 commit comments

Comments
 (0)