Skip to content

process.execArgv includes user options with the same names as bun's options #25387

@kit494way

Description

@kit494way

What version of Bun is running?

1.3.3

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

bun --eval "console.log({execArgv: process.execArgv, argv: process.argv})" -- --silent arg1 arg2

What is the expected behavior?

{
  execArgv: [ "--eval", "console.log({execArgv: process.execArgv, argv: process.argv})"],
  argv: [ "/home/kit494way/.local/share/mise/installs/bun/1.3.3/bin/bun", "--silent",
    "arg1", "arg2"
  ],
}

What do you see instead?

{
  execArgv: [ "--eval", "console.log({execArgv: process.execArgv, argv: process.argv})",
    "--", "--silent"
  ],
  argv: [ "/home/kit494way/.local/share/mise/installs/bun/1.3.3/bin/bun", "--silent",
    "arg1", "arg2"
  ],
}

Additional information

Whether an option is included in execArgv depends on its order.

$ bun --eval "console.log({execArgv: process.execArgv, argv: process.argv})" -- --silent arg1 arg2
{
  execArgv: [ "--eval", "console.log({execArgv: process.execArgv, argv: process.argv})",
    "--", "--silent"
  ],
  argv: [ "/home/kit494way/.local/share/mise/installs/bun/1.3.3/bin/bun", "--silent",
    "arg1", "arg2"
  ],
}
$ bun --eval "console.log({execArgv: process.execArgv, argv: process.argv})" -- arg1 --silent arg2
{
  execArgv: [ "--eval", "console.log({execArgv: process.execArgv, argv: process.argv})",
    "--"
  ],
  argv: [ "/home/kit494way/.local/share/mise/installs/bun/1.3.3/bin/bun", "arg1", "--silent",
    "arg2"
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions