Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Passthrough env to npm subcommands when using the system node runtime (#43102)

Yeoh Joerb577f8a5ea3f
diff --git a/crates/node_runtime/src/node_runtime.rs b/crates/node_runtime/src/node_runtime.rs
index 6e705289a3f..1faf22dc984 100644
--- a/crates/node_runtime/src/node_runtime.rs
+++ b/crates/node_runtime/src/node_runtime.rs
@@ -414,7 +414,6 @@ impl ManagedNodeRuntime {
let valid = if fs::metadata(&node_binary).await.is_ok() {
let result = util::command::new_smol_command(&node_binary)
- .env_clear()
.env(NODE_CA_CERTS_ENV_VAR, node_ca_certs)
.arg(npm_file)
.arg("--version")
@@ -701,7 +700,6 @@ impl NodeRuntimeTrait for SystemNodeRuntime {
let mut command = util::command::new_smol_command(self.npm.clone());
let path = path_with_node_binary_prepended(&self.node).unwrap_or_default();
command
- .env_clear()
.env("PATH", path)
.env(NODE_CA_CERTS_ENV_VAR, node_ca_certs)
.arg(subcommand)