diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-10 23:58:26 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-10 23:58:26 +0900 |
| commit | 8871b923fa3df1935c263db155cb8bc3d59705cd (patch) | |
| tree | 4c080d383c30a0d92229f9b411f1d94976a6e707 /crates/mozart/src/commands/run_script.rs | |
| parent | 59bab6efee41a196b0d9d392167c536abbe068ba (diff) | |
| download | php-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.tar.gz php-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.tar.zst php-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.zip | |
refactor(downloader): turn DownloadManager into downloader registry
Reshape DownloadManager from a hard-coded VCS match into a registry of
DownloaderInterface instances keyed by source type, mirroring
Composer's DownloadManager — with prefer-source/dist preferences, an
IO handle, and a files cache. ArchiveManager now resolves dist
sources through a shared DownloadManager instead of calling
download_dist directly, and Composer::require / try_load take an IO
so it flows through the factory wiring.
Diffstat (limited to 'crates/mozart/src/commands/run_script.rs')
| -rw-r--r-- | crates/mozart/src/commands/run_script.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/src/commands/run_script.rs b/crates/mozart/src/commands/run_script.rs index c2e52a6..ab3700d 100644 --- a/crates/mozart/src/commands/run_script.rs +++ b/crates/mozart/src/commands/run_script.rs @@ -42,7 +42,7 @@ pub async fn execute( let working_dir = cli.working_dir()?; if args.list { - Composer::require(&working_dir)?; + Composer::require(io.clone(), &working_dir)?; let (scripts, descriptions) = load_scripts(&working_dir)?; return list_scripts(&scripts, &descriptions, io.clone()); } @@ -58,7 +58,7 @@ pub async fn execute( anyhow::bail!("Script \"{}\" cannot be run with this command", script); } - let composer = Composer::require(&working_dir)?; + let composer = Composer::require(io.clone(), &working_dir)?; let dev_mode = args.dev || !args.no_dev; let (scripts, _descriptions) = load_scripts(&working_dir)?; |
