diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-06 03:38:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-06 04:05:13 +0900 |
| commit | bf96f8292c0e9818c8b5fc8713ca7506e4338a49 (patch) | |
| tree | 61ddecc119ee0ae344eabdb9c0f784cdb3461a44 /crates/mozart/src/commands/status.rs | |
| parent | b97e34358be5df05a3db9f5f3ef1502eaa94b1c0 (diff) | |
| download | php-mozart-bf96f8292c0e9818c8b5fc8713ca7506e4338a49.tar.gz php-mozart-bf96f8292c0e9818c8b5fc8713ca7506e4338a49.tar.zst php-mozart-bf96f8292c0e9818c8b5fc8713ca7506e4338a49.zip | |
refactor(console): add write macros and migrate commands to use them
Diffstat (limited to 'crates/mozart/src/commands/status.rs')
| -rw-r--r-- | crates/mozart/src/commands/status.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/mozart/src/commands/status.rs b/crates/mozart/src/commands/status.rs index 9bccef0..c2f0d69 100644 --- a/crates/mozart/src/commands/status.rs +++ b/crates/mozart/src/commands/status.rs @@ -1,6 +1,6 @@ use clap::Args; use indexmap::IndexMap; -use mozart_core::console::Verbosity; +use mozart_core::console_writeln; use sha1::{Digest, Sha1}; use std::path::{Path, PathBuf}; @@ -176,9 +176,9 @@ pub async fn execute( for pkg_status in &modified_packages { if let Some(ref note) = pkg_status.note { - console.write_stdout(note, Verbosity::Normal); + console_writeln!(console, note); } else { - console.write_stdout(&pkg_status.install_path, Verbosity::Normal); + console_writeln!(console, &pkg_status.install_path); if show_files { let mut sorted_changes: Vec<&FileChange> = pkg_status.changes.iter().collect(); @@ -190,10 +190,7 @@ pub async fn execute( ChangeKind::Added => '+', ChangeKind::Removed => '-', }; - console.write_stdout( - &format!(" {} {}", prefix, change.path), - Verbosity::Normal, - ); + console_writeln!(console, &format!(" {} {}", prefix, change.path),); } } } |
