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/validate.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/validate.rs')
| -rw-r--r-- | crates/mozart/src/commands/validate.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/mozart/src/commands/validate.rs b/crates/mozart/src/commands/validate.rs index 6bff198..972593f 100644 --- a/crates/mozart/src/commands/validate.rs +++ b/crates/mozart/src/commands/validate.rs @@ -1,6 +1,6 @@ use clap::Args; -use mozart_core::console::Verbosity; use mozart_core::console_format; +use mozart_core::console_writeln; use regex::Regex; use std::path::{Path, PathBuf}; use std::sync::LazyLock; @@ -789,15 +789,12 @@ fn output_result( )); } else if !lock_errors.is_empty() { let kind = if check_lock { "errors" } else { "warnings" }; - console.write_stdout( + console_writeln!( + console, &console_format!("<info>{name} is valid but your composer.lock has some {kind}</info>"), - Verbosity::Normal, ); } else { - console.write_stdout( - &console_format!("<info>{name} is valid</info>"), - Verbosity::Normal, - ); + console_writeln!(console, &console_format!("<info>{name} is valid</info>"),); } // Collect error and warning message lines |
