From 4f78e6c6497135cbc2923089ee26f5a50e43f06a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 5 May 2026 16:51:50 +0900 Subject: refactor(commands): consolidate working_dir resolution into Cli method --- crates/mozart/src/commands/suggests.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'crates/mozart/src/commands/suggests.rs') diff --git a/crates/mozart/src/commands/suggests.rs b/crates/mozart/src/commands/suggests.rs index 6d1765e..61185b2 100644 --- a/crates/mozart/src/commands/suggests.rs +++ b/crates/mozart/src/commands/suggests.rs @@ -5,7 +5,7 @@ use mozart_core::console; use mozart_core::console::Verbosity; use mozart_core::console_format; use std::collections::BTreeMap; -use std::path::{Path, PathBuf}; +use std::path::Path; #[derive(Args)] pub struct SuggestsArgs { @@ -48,10 +48,7 @@ pub async fn execute( cli: &super::Cli, console: &console::Console, ) -> anyhow::Result<()> { - let working_dir = match &cli.working_dir { - Some(dir) => PathBuf::from(dir), - None => std::env::current_dir()?, - }; + let working_dir = cli.working_dir()?; let lock_path = working_dir.join("composer.lock"); let has_lock = lock_path.exists(); -- cgit v1.3.1