aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/global.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands/global.rs')
-rw-r--r--crates/mozart/src/commands/global.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/mozart/src/commands/global.rs b/crates/mozart/src/commands/global.rs
index 05e8aae..5d5cb81 100644
--- a/crates/mozart/src/commands/global.rs
+++ b/crates/mozart/src/commands/global.rs
@@ -1,5 +1,5 @@
use clap::Args;
-use mozart_core::composer::composer_home;
+use mozart_core::{composer::composer_home, console::IoInterface};
#[derive(Args)]
pub struct GlobalArgs {
@@ -14,7 +14,7 @@ pub struct GlobalArgs {
pub async fn execute(
args: &GlobalArgs,
cli: &super::Cli,
- console: &mozart_core::console::Console,
+ io: std::sync::Arc<std::sync::Mutex<Box<dyn IoInterface>>>,
) -> anyhow::Result<()> {
use clap::Parser as _;
use std::fs;
@@ -32,7 +32,9 @@ pub async fn execute(
fs::create_dir_all(&home)?;
- console.info(&format!("Changed current directory to {}", home.display()));
+ io.lock()
+ .unwrap()
+ .info(&format!("Changed current directory to {}", home.display()));
// SAFETY: single-threaded at this point; no concurrent env access
unsafe {