Run system npm directly (#18280)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin authored and GitHub committed 2024-09-24 09:44:53 -06:00
1 parent 7fdbb91b94
commit 90f86c91b8
1 file changed
+1 -2
+1 -2
View File
@@ -538,11 +538,10 @@ impl NodeRuntimeTrait for SystemNodeRuntime {
subcommand: &str,
args: &[&str],
) -> anyhow::Result<Output> {
let mut command = Command::new(self.node.clone());
let mut command = Command::new(self.npm.clone());
command
.env_clear()
.env("PATH", std::env::var_os("PATH").unwrap_or_default())
.arg(self.npm.clone())
.arg(subcommand)
.args(["--cache".into(), self.scratch_dir.join("cache")])
.args([