Run system npm directly (#18280)

Conrad Irwin created

Release Notes:

- N/A

Change summary

crates/node_runtime/src/node_runtime.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Detailed changes

crates/node_runtime/src/node_runtime.rs 🔗

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