-
Notifications
You must be signed in to change notification settings - Fork 3.1k
bun run
should prioritize running script over file/directory
#7735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting, tried on macOS arm64.
{
"dependencies": {
"express": "^4.18.2"
},
"scripts": {
"build": "echo Hi"
}
} |
I did some more testing and figured out that it's because I have a directory that is named build. |
bun run --bun build
gives Module not found
bun run
should prioritize running script over file/directory
Yep, looks like that's the issue. We should fix this so |
idk if this is a goodfirstissue but if someone wants to investigate the code, run command starts in run_command.zig line 1032 "pub fn exec(" |
Is there any way to force bun to use script? |
What version of Bun is running?
1.0.18+1a2643520
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Simply have a script called
build
and try to run it with the--bun
flagWhat is the expected behavior?
The script should run like the following:

Note I removed the
d
in the script name to make it workWhat do you see instead?
Additional information
I couldn't reproduce the issue with other flags but the --bun and -b flags.
The text was updated successfully, but these errors were encountered: