From d6e0c6d34449224ac3687daf551a0acfd15cee32 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 15:11:36 +0900 Subject: refactor(cli): route command output through Console abstraction Replace direct println\!/eprintln\! calls with console.write(), console.info(), and console.write_stdout() across all command handlers to respect verbosity settings. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/reinstall.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 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 b38d9f7..abc207f 100644 --- a/crates/mozart/src/commands/reinstall.rs +++ b/crates/mozart/src/commands/reinstall.rs @@ -152,7 +152,7 @@ pub async fn execute( } if selected.is_empty() { - eprintln!("Found no packages to reinstall, aborting."); + console.info("Found no packages to reinstall, aborting."); return Err(mozart_core::exit_code::bail_silent( mozart_core::exit_code::GENERAL_ERROR, )); @@ -171,9 +171,15 @@ pub async fn execute( for pkg in &selected { let locked = find_locked_package(&all_locked, &pkg.name); if let Some(lp) = locked { - println!(" - Would reinstall {} ({})", lp.name, lp.version); + console.write_stdout( + &format!(" - Would reinstall {} ({})", lp.name, lp.version), + mozart_core::console::Verbosity::Normal, + ); } else { - println!(" - Would reinstall {} (not found in lock file)", pkg.name); + console.write_stdout( + &format!(" - Would reinstall {} (not found in lock file)", pkg.name), + mozart_core::console::Verbosity::Normal, + ); } } return Ok(()); @@ -242,7 +248,10 @@ pub async fn execute( } if reinstalled_count == 0 { - println!("Nothing was reinstalled."); + console.write_stdout( + "Nothing was reinstalled.", + mozart_core::console::Verbosity::Normal, + ); return Ok(()); } -- cgit v1.3.1