summaryrefslogtreecommitdiff
path: root/cli/npm/installer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/npm/installer.rs')
-rw-r--r--cli/npm/installer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/npm/installer.rs b/cli/npm/installer.rs
index 8590feb9c..adb4344ee 100644
--- a/cli/npm/installer.rs
+++ b/cli/npm/installer.rs
@@ -64,6 +64,12 @@ impl PackageJsonDepsInstaller {
}))
}
+ /// Creates an installer that never installs local packages during
+ /// resolution. A top level install will be a no-op.
+ pub fn no_op() -> Self {
+ Self(None)
+ }
+
/// Installs the top level dependencies in the package.json file
/// without going through and resolving the descendant dependencies yet.
pub async fn ensure_top_level_install(&self) -> Result<(), AnyError> {