diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-05 16:51:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-05 16:51:50 +0900 |
| commit | 4f78e6c6497135cbc2923089ee26f5a50e43f06a (patch) | |
| tree | 72d0bf2e188d5675d895b1d2aace447dd585b748 /crates/mozart/src/commands/outdated.rs | |
| parent | 2ad57b7efb685040b24d93aab5b81ddfbd0ebefb (diff) | |
| download | php-mozart-4f78e6c6497135cbc2923089ee26f5a50e43f06a.tar.gz php-mozart-4f78e6c6497135cbc2923089ee26f5a50e43f06a.tar.zst php-mozart-4f78e6c6497135cbc2923089ee26f5a50e43f06a.zip | |
refactor(commands): consolidate working_dir resolution into Cli method
Diffstat (limited to 'crates/mozart/src/commands/outdated.rs')
| -rw-r--r-- | crates/mozart/src/commands/outdated.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/mozart/src/commands/outdated.rs b/crates/mozart/src/commands/outdated.rs index 5a4f854..61a1e8b 100644 --- a/crates/mozart/src/commands/outdated.rs +++ b/crates/mozart/src/commands/outdated.rs @@ -2,7 +2,7 @@ use clap::Args; use indexmap::IndexSet; use mozart_core::matches_wildcard; use std::cmp::Ordering; -use std::path::{Path, PathBuf}; +use std::path::Path; #[derive(Args)] pub struct OutdatedArgs { @@ -111,10 +111,7 @@ pub async fn execute( anyhow::bail!("Only one of --major-only, --minor-only or --patch-only can be used at once"); } - let working_dir = match &cli.working_dir { - Some(dir) => PathBuf::from(dir), - None => std::env::current_dir()?, - }; + let working_dir = cli.working_dir()?; // Load packages (installed or locked) let packages = if args.locked { |
