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/repository.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/repository.rs')
| -rw-r--r-- | crates/mozart/src/commands/repository.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/mozart/src/commands/repository.rs b/crates/mozart/src/commands/repository.rs index e8ca920..7b5b7a3 100644 --- a/crates/mozart/src/commands/repository.rs +++ b/crates/mozart/src/commands/repository.rs @@ -4,8 +4,7 @@ use std::path::PathBuf; use super::config_helpers::{ add_repository, composer_home, ensure_repositories_array, find_repo_by_name, insert_repository, - normalize_repositories, read_json_file, remove_repository, render_value, working_dir, - write_json_file, + normalize_repositories, read_json_file, remove_repository, render_value, write_json_file, }; #[derive(Args)] @@ -53,7 +52,7 @@ fn resolve_file_path(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result< if let Some(ref file) = args.file { return Ok(PathBuf::from(file)); } - Ok(working_dir(cli)?.join("composer.json")) + Ok(cli.working_dir()?.join("composer.json")) } pub async fn execute( |
