Skip to content

fix: pass process.env to Bun.spawn() in spawnWithWindowsHide#3527

Open
RuslanGainanov wants to merge 1 commit intocode-yeongyu:devfrom
RuslanGainanov:fix/spawn-with-windows-hide-env
Open

fix: pass process.env to Bun.spawn() in spawnWithWindowsHide#3527
RuslanGainanov wants to merge 1 commit intocode-yeongyu:devfrom
RuslanGainanov:fix/spawn-with-windows-hide-env

Conversation

@RuslanGainanov
Copy link
Copy Markdown

@RuslanGainanov RuslanGainanov commented Apr 19, 2026

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

Before After

Testing

bun run typecheck
bun test

Related Issues


Summary by cubic

Ensure spawned processes inherit the environment by default to avoid losing proxy variables. Pass process.env to Bun.spawn() (and Windows spawn) when env isn’t provided, fixing plugin auto-install behind proxies.

  • Bug Fixes
    • Preserve HTTP_PROXY/HTTPS_PROXY so bun install works during plugin auto-install; resolves “fetch() proxy.url must be a non-empty string”.

Written for commit 3da9b5d. Summary will update on new commits.

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.
@github-actions
Copy link
Copy Markdown
Contributor

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:

I have read the CLA Document and I hereby sign the CLA

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.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RuslanGainanov
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant