Run system npm directly (#18280)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-09-24 09:44:53 -06:00 committed by GitHub
parent 21be70f278
commit 5e62bbfd29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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([