Remove unused global npm root from system runtime

Ben Brandt created

Change summary

crates/node_runtime/src/node_runtime.rs | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)

Detailed changes

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<Self, DetectError> {