aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands')
-rw-r--r--crates/mozart/src/commands/install.rs1
-rw-r--r--crates/mozart/src/commands/update.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/mozart/src/commands/install.rs b/crates/mozart/src/commands/install.rs
index f920f02..b9ff1af 100644
--- a/crates/mozart/src/commands/install.rs
+++ b/crates/mozart/src/commands/install.rs
@@ -809,6 +809,7 @@ pub async fn execute(
}
let root_pkg = mozart_core::package::read_from_file(&composer_json_path)?;
+ root_pkg.validate_root_does_not_self_require()?;
let missing = lock.get_missing_requirement_info(&root_pkg, dev_mode);
if !missing.is_empty() {
for line in &missing {
diff --git a/crates/mozart/src/commands/update.rs b/crates/mozart/src/commands/update.rs
index da2fd95..3a468d4 100644
--- a/crates/mozart/src/commands/update.rs
+++ b/crates/mozart/src/commands/update.rs
@@ -747,6 +747,7 @@ pub async fn execute(
));
}
let composer_json = package::read_from_file(&composer_json_path)?;
+ composer_json.validate_root_does_not_self_require()?;
let composer_json_content = std::fs::read_to_string(&composer_json_path)?;
let lock_path = working_dir.join("composer.lock");