-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Bun trims environment variables #3689
Comments
On my side it seems to be fine when using the dev/release builds (no space trimmed) is the publicly shared bin different from the release build? |
I think it's because when parsing the value, the spaces get ignored at the beginning because of env_loader.zig#L695C1-L695C1 |
Related #3743 (comment) |
I think what you're looking for is #3716 |
then we might want to mark this as closed |
What version of Bun is running?
0.6.15
What platform is your computer?
Linux 6.3.9-zen1-1-zen x86_64
What steps can reproduce the bug?
a.js:
console.log(process.env.EXAMPLE, process.env.EXAMPLE == " hi")
console:
EXAMPLE=" hi" bun run a.js
What is the expected behavior?
" hi true" in the terminal. (like node.js)
What do you see instead?
"hi false" in the terminal
Additional information
I found this bug while working on #3661,
also it works correctly if the env is set in .env
The text was updated successfully, but these errors were encountered: