From 4bac646a0e9c032779dd7e2cc0a6dd63adaf41f1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 22 Feb 2026 23:45:36 +0900 Subject: 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 --- crates/mozart/src/commands/reinstall.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/mozart/src/commands/reinstall.rs') 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. -- cgit v1.3.1