diff options
Diffstat (limited to 'crates/mozart/src/commands')
| -rw-r--r-- | crates/mozart/src/commands/install.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/crates/mozart/src/commands/install.rs b/crates/mozart/src/commands/install.rs index 62a7d21..7a5ebe9 100644 --- a/crates/mozart/src/commands/install.rs +++ b/crates/mozart/src/commands/install.rs @@ -1204,9 +1204,21 @@ pub async fn run( for line in &missing { console.info(line); } - return Err(mozart_core::exit_code::bail_silent( - mozart_core::exit_code::LOCK_FILE_INVALID, - )); + // Mirrors `Composer\Installer::doInstall()` lines 749-756: when + // `config.allow-missing-requirements` is true, print the warnings + // but proceed with what the lock already covers instead of + // bailing with ERROR_LOCK_FILE_INVALID. + let allow_missing = root_pkg + .extra_fields + .get("config") + .and_then(|v| v.get("allow-missing-requirements")) + .and_then(|v| v.as_bool()) + .unwrap_or(false); + if !allow_missing { + return Err(mozart_core::exit_code::bail_silent( + mozart_core::exit_code::LOCK_FILE_INVALID, + )); + } } let platform_problems = collect_install_platform_problems( |
