aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/reinstall.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-22 23:45:36 +0900
committernsfisis <nsfisis@gmail.com>2026-02-22 23:45:36 +0900
commit4bac646a0e9c032779dd7e2cc0a6dd63adaf41f1 (patch)
tree8643cff0792e7586a7f568e812575176b48f2c6d /crates/mozart/src/commands/reinstall.rs
parentecac6d7b4b8899ec349766f154dc097db069c27e (diff)
downloadphp-mozart-4bac646a0e9c032779dd7e2cc0a6dd63adaf41f1.tar.gz
php-mozart-4bac646a0e9c032779dd7e2cc0a6dd63adaf41f1.tar.zst
php-mozart-4bac646a0e9c032779dd7e2cc0a6dd63adaf41f1.zip
fix(reinstall): exit 1 when no packages match criteria
Composer returns exit code 1 and writes to stderr when no packages match the reinstall patterns. Mozart was returning 0 with a stdout message, which could mislead CI pipelines into thinking the command succeeded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/reinstall.rs')
-rw-r--r--crates/mozart/src/commands/reinstall.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/src/commands/reinstall.rs b/crates/mozart/src/commands/reinstall.rs
index 91c2aaf..313c70c 100644
--- a/crates/mozart/src/commands/reinstall.rs
+++ b/crates/mozart/src/commands/reinstall.rs
@@ -135,8 +135,8 @@ pub async fn execute(
};
if selected.is_empty() {
- println!("No packages matched the given criteria.");
- return Ok(());
+ eprintln!("Found no packages to reinstall, aborting.");
+ std::process::exit(1);
}
// Step 6: For each selected package, find its locked metadata.