bun
bun copied to clipboard
Bun is case-sensetive to file extensions on Windows
What version of Bun is running?
1.1.3+2615dc742
What platform is your computer?
Microsoft Windows NT 10.0.22635.0 x64
What steps can reproduce the bug?
Returns an error:
bun -e "var spawn = require('child_process').spawn;spawn('notepad.EXE')"
Works correctly:
bun -e "var spawn = require('child_process').spawn;spawn('notepad.exe')"
Happens due to this check: https://github.com/oven-sh/bun/blob/e30a848c4c7a4aa80c8c15a6b559ea55e4233fc5/src/which.zig#L82
What is the expected behavior?
I expect Bun to be case-insensitive to file extensions, so the mentioned command will open notepad
What do you see instead?
TypeError: Executable not found in $PATH: "notepad.EXE"
code: "ERR_INVALID_ARG_TYPE"
at spawn (node:child_process : 650:15)
at node:child_process : 2:41
at globalThis (C:\Users\Sunset\[eval]: 1:44)
Additional information
Node handles this correctly:
node -e "var spawn = require('child_process').spawn;spawn('notepad.EXE')"