aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/remove.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands/remove.rs')
-rw-r--r--crates/mozart/src/commands/remove.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/mozart/src/commands/remove.rs b/crates/mozart/src/commands/remove.rs
index ff3df47..56555f7 100644
--- a/crates/mozart/src/commands/remove.rs
+++ b/crates/mozart/src/commands/remove.rs
@@ -1,7 +1,7 @@
use clap::Args;
use indexmap::{IndexMap, IndexSet};
-use mozart_core::console::Verbosity;
use mozart_core::console_format;
+use mozart_core::console_writeln;
use mozart_core::package;
use mozart_core::validation;
use mozart_registry::lockfile;
@@ -151,9 +151,9 @@ pub async fn execute(
if args.dev {
// Only look in require-dev
if raw.require_dev.contains_key(&name) {
- console.write_stdout(
+ console_writeln!(
+ console,
&console_format!("<info>Removing {name} from require-dev</info>"),
- Verbosity::Normal,
);
raw.require_dev.remove(&name);
any_removed = true;
@@ -163,16 +163,16 @@ pub async fn execute(
} else {
// Auto-detect: look in require first, then require-dev
if raw.require.contains_key(&name) {
- console.write_stdout(
+ console_writeln!(
+ console,
&console_format!("<info>Removing {name} from require</info>"),
- Verbosity::Normal,
);
raw.require.remove(&name);
any_removed = true;
} else if raw.require_dev.contains_key(&name) {
- console.write_stdout(
+ console_writeln!(
+ console,
&console_format!("<info>Removing {name} from require-dev</info>"),
- Verbosity::Normal,
);
raw.require_dev.remove(&name);
any_removed = true;
@@ -184,9 +184,9 @@ pub async fn execute(
// Step 6: Write updated composer.json (unless --dry-run)
if args.dry_run {
- console.write_stdout(
+ console_writeln!(
+ console,
&console_format!("<comment>Dry run: composer.json not modified.</comment>"),
- Verbosity::Normal,
);
} else if any_removed {
package::write_to_file(&raw, &composer_path)?;
@@ -195,11 +195,11 @@ pub async fn execute(
// Step 7: Handle --no-update early return
if args.no_update {
- console.write_stdout(
+ console_writeln!(
+ console,
&console_format!(
"<comment>Not updating dependencies, only modifying composer.json.</comment>"
),
- Verbosity::Normal,
);
return Ok(());
}