The open source coding agent.
TypeScript
core: use --no-cache when behind proxy to avoid hangs
Aiden Cline8ebc601ea287
diff --git a/packages/opencode/src/bun/index.ts b/packages/opencode/src/bun/index.tsindex 55bbf7b4170..fe2f0dec371 100644--- a/packages/opencode/src/bun/index.ts+++ b/packages/opencode/src/bun/index.ts@@ -73,8 +73,24 @@ export namespace BunProc {})if (parsed.dependencies[pkg] === version) return mod+ const proxied = !!(+ process.env.HTTP_PROXY ||+ process.env.HTTPS_PROXY ||+ process.env.http_proxy ||+ process.env.https_proxy+ )+// Build command arguments- const args = ["add", "--force", "--exact", "--cwd", Global.Path.cache, pkg + "@" + version]+ const args = [+ "add",+ "--force",+ "--exact",+ // TODO: get rid of this case (see: https://github.com/oven-sh/bun/issues/19936)+ ...(proxied ? ["--no-cache"] : []),+ "--cwd",+ Global.Path.cache,+ pkg + "@" + version,+ ]// Let Bun handle registry resolution:// - If .npmrc files exist, Bun will use them automatically