From f98f32c1f4a3efce7dfe494c758b1502ae8d5467 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Thu, 9 Apr 2026 23:19:31 +0200 Subject: [PATCH] Remove unused global npm root from system runtime --- crates/node_runtime/src/node_runtime.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/crates/node_runtime/src/node_runtime.rs b/crates/node_runtime/src/node_runtime.rs index b0a7f82a40a507e341b4d3e1141f925be350f5aa..9d4bfe9cffb538e576b521f6cdb9f7ca7480a8c8 100644 --- a/crates/node_runtime/src/node_runtime.rs +++ b/crates/node_runtime/src/node_runtime.rs @@ -643,7 +643,6 @@ impl NodeRuntimeTrait for ManagedNodeRuntime { pub struct SystemNodeRuntime { node: PathBuf, npm: PathBuf, - global_node_modules: PathBuf, scratch_dir: PathBuf, } @@ -677,17 +676,11 @@ impl SystemNodeRuntime { fs::create_dir(&scratch_dir).await.ok(); fs::create_dir(scratch_dir.join("cache")).await.ok(); - let mut this = Self { + Ok(Self { node, npm, - global_node_modules: PathBuf::default(), scratch_dir, - }; - let output = this.run_npm_subcommand(None, None, "root", &["-g"]).await?; - this.global_node_modules = - PathBuf::from(String::from_utf8_lossy(&output.stdout).to_string()); - - Ok(this) + }) } async fn detect() -> std::result::Result {