|
@@ -73,8 +73,24 @@ export namespace BunProc {
|
|
|
})
|
|
})
|
|
|
if (parsed.dependencies[pkg] === version) return mod
|
|
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
|
|
// 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:
|
|
// Let Bun handle registry resolution:
|
|
|
// - If .npmrc files exist, Bun will use them automatically
|
|
// - If .npmrc files exist, Bun will use them automatically
|