summaryrefslogtreecommitdiff
path: root/cli/graph_util.rs
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-08-29 15:57:43 -0700
committerGitHub <noreply@github.com>2024-08-29 15:57:43 -0700
commit86d5b919d8ef55070e95230c9268f69cf58c25c8 (patch)
tree7d005a7116ecb44fc95e64489eac66f786d2ef11 /cli/graph_util.rs
parent0fb8df6c0ce582c947a8e165c7fb31cd4ec0c3ca (diff)
feat(config): Node modules option for 2.0 (#25299)
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r--cli/graph_util.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs
index c8432b67e..8ff6c9ae3 100644
--- a/cli/graph_util.rs
+++ b/cli/graph_util.rs
@@ -541,7 +541,12 @@ impl ModuleGraphBuilder {
) -> Result<(), AnyError> {
// ensure an "npm install" is done if the user has explicitly
// opted into using a node_modules directory
- if self.options.node_modules_dir_enablement() == Some(true) {
+ if self
+ .options
+ .node_modules_mode()?
+ .map(|m| m.uses_node_modules_dir())
+ .unwrap_or(false)
+ {
if let Some(npm_resolver) = self.npm_resolver.as_managed() {
npm_resolver.ensure_top_level_package_json_install().await?;
}