fix: pass process.env to Bun.spawn() in spawnWithWindowsHide#3527
fix: pass process.env to Bun.spawn() in spawnWithWindowsHide#3527RuslanGainanov wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
When Bun.spawn() is called without an env property, it creates a clean environment instead of inheriting from process.env. This causes proxy environment variables (HTTP_PROXY, HTTPS_PROXY, etc.) to be lost when spawning 'bun install' for plugin installation. Fixes: fetch() proxy.url must be a non-empty string error when plugin auto-install runs behind a proxy.
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA). To sign the CLA, please comment on this PR with: This is a one-time requirement. Once signed, all your future contributions will be automatically accepted. I have read the CLA Document and I hereby sign the CLA Sisyphus seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: The fix correctly restores environment inheritance for spawned processes, which is the expected behavior in Node.js and avoids losing proxy settings. Low risk change.
|
I have read the CLA Document and I hereby sign the CLA |
When Bun.spawn() is called without an env property, it creates a clean environment instead of inheriting from process.env. This causes proxy environment variables (HTTP_PROXY, HTTPS_PROXY, etc.) to be lost when spawning 'bun install' for plugin installation.
Fixes: fetch() proxy.url must be a non-empty string error when plugin auto-install runs behind a proxy.
Summary
Changes
Screenshots
Testing
bun run typecheck bun testRelated Issues
Summary by cubic
Ensure spawned processes inherit the environment by default to avoid losing proxy variables. Pass
process.envtoBun.spawn()(and Windowsspawn) whenenvisn’t provided, fixing plugin auto-install behind proxies.HTTP_PROXY/HTTPS_PROXYsobun installworks during plugin auto-install; resolves “fetch() proxy.url must be a non-empty string”.Written for commit 3da9b5d. Summary will update on new commits.