mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 06:41:50 +00:00
When `bun run --bun` is used, child processes invoking `node` actually run bun via a symlink. Node.js v22+ supports `node --run <script>` to run package.json scripts, but bun's fake node mode silently ignored the `--run` flag and tried to execute the script name as a file path instead. Detect `--run` in the raw argv and delegate to `RunCommand.exec()` which already handles package.json script resolution with pre/post scripts. Closes #27074 Co-Authored-By: Claude <noreply@anthropic.com>