aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/prohibits.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 15:11:36 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 15:11:36 +0900
commitd6e0c6d34449224ac3687daf551a0acfd15cee32 (patch)
treed6767718ad566542d4770d4688d9961e0f74ea3d /crates/mozart/src/commands/prohibits.rs
parent7e45efd8a1f488b1a684f9efe31ff39009fc9e54 (diff)
downloadphp-mozart-d6e0c6d34449224ac3687daf551a0acfd15cee32.tar.gz
php-mozart-d6e0c6d34449224ac3687daf551a0acfd15cee32.tar.zst
php-mozart-d6e0c6d34449224ac3687daf551a0acfd15cee32.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/prohibits.rs')
-rw-r--r--crates/mozart/src/commands/prohibits.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/mozart/src/commands/prohibits.rs b/crates/mozart/src/commands/prohibits.rs
index f3b7916..8eb4166 100644
--- a/crates/mozart/src/commands/prohibits.rs
+++ b/crates/mozart/src/commands/prohibits.rs
@@ -71,21 +71,21 @@ pub async fn execute(
)?;
if results.is_empty() {
- println!(
- "{}",
- console_format!(
+ console.write_stdout(
+ &console_format!(
"<info>{} {} can be installed.</info>",
args.package,
args.version
- )
+ ),
+ mozart_core::console::Verbosity::Normal,
);
return Ok(());
}
if args.tree {
- super::dependency::print_tree(&results, 0);
+ super::dependency::print_tree(&results, 0, console);
} else {
- super::dependency::print_table(&results);
+ super::dependency::print_table(&results, console);
}
// Fix #5: Print resolution hint message
@@ -114,10 +114,10 @@ pub async fn execute(
})
.unwrap_or("update");
- eprintln!(
+ console.info(&format!(
"Not finding what you were looking for? Try calling `composer {} \"{}:{}\" --dry-run` to get another view on the problem.",
composer_command, args.package, args.version
- );
+ ));
// Fix #3: Return exit code 1 when prohibitors are found
Err(mozart_core::exit_code::bail_silent(