diff options
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 553af51a1..e048b332a 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1720,6 +1720,20 @@ impl CliOptions { } full_paths } + + pub fn lifecycle_scripts_config(&self) -> LifecycleScriptsConfig { + LifecycleScriptsConfig { + allowed: self.flags.allow_scripts.clone(), + initial_cwd: if matches!( + self.flags.allow_scripts, + PackagesAllowedScripts::None + ) { + None + } else { + Some(self.initial_cwd.clone()) + }, + } + } } /// Resolves the path to use for a local node_modules folder. |