diff options
Diffstat (limited to 'cli/tools/run.rs')
-rw-r--r-- | cli/tools/run.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cli/tools/run.rs b/cli/tools/run.rs index 6ded628ea..5fb31a4ad 100644 --- a/cli/tools/run.rs +++ b/cli/tools/run.rs @@ -186,13 +186,11 @@ pub async fn eval_command( async fn maybe_npm_install(factory: &CliFactory) -> Result<(), AnyError> { // ensure an "npm install" is done if the user has explicitly - // opted into using a node_modules directory + // opted into using a managed node_modules directory if factory.cli_options().node_modules_dir_enablement() == Some(true) { - factory - .package_json_deps_installer() - .await? - .ensure_top_level_install() - .await?; + if let Some(npm_resolver) = factory.npm_resolver().await?.as_managed() { + npm_resolver.ensure_top_level_package_json_install().await?; + } } Ok(()) } |