From bf96f8292c0e9818c8b5fc8713ca7506e4338a49 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 6 May 2026 03:38:32 +0900 Subject: refactor(console): add write macros and migrate commands to use them --- crates/mozart/src/commands/reinstall.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 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 7e426f8..b421bd8 100644 --- a/crates/mozart/src/commands/reinstall.rs +++ b/crates/mozart/src/commands/reinstall.rs @@ -1,5 +1,6 @@ use clap::Args; use mozart_core::console_format; +use mozart_core::console_writeln; use mozart_core::package; #[derive(Args)] @@ -164,14 +165,14 @@ pub async fn execute( for pkg in &selected { let locked = find_locked_package(&all_locked, &pkg.name); if let Some(lp) = locked { - console.write_stdout( + console_writeln!( + console, &format!(" - Would reinstall {} ({})", lp.name, lp.version), - mozart_core::console::Verbosity::Normal, ); } else { - console.write_stdout( + console_writeln!( + console, &format!(" - Would reinstall {} (not found in lock file)", pkg.name), - mozart_core::console::Verbosity::Normal, ); } } @@ -241,10 +242,7 @@ pub async fn execute( } if reinstalled_count == 0 { - console.write_stdout( - "Nothing was reinstalled.", - mozart_core::console::Verbosity::Normal, - ); + console_writeln!(console, "Nothing was reinstalled.",); return Ok(()); } -- cgit v1.3.1