aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/status.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-10 23:58:26 +0900
committernsfisis <nsfisis@gmail.com>2026-05-10 23:58:26 +0900
commit8871b923fa3df1935c263db155cb8bc3d59705cd (patch)
tree4c080d383c30a0d92229f9b411f1d94976a6e707 /crates/mozart/src/commands/status.rs
parent59bab6efee41a196b0d9d392167c536abbe068ba (diff)
downloadphp-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/status.rs')
-rw-r--r--crates/mozart/src/commands/status.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/src/commands/status.rs b/crates/mozart/src/commands/status.rs
index d538138..cb33223 100644
--- a/crates/mozart/src/commands/status.rs
+++ b/crates/mozart/src/commands/status.rs
@@ -17,11 +17,11 @@ pub async fn execute(
io: std::sync::Arc<std::sync::Mutex<Box<dyn IoInterface>>>,
) -> anyhow::Result<()> {
// init repos
- let composer = Composer::require(cli.working_dir()?)?;
+ let composer = Composer::require(io.clone(), cli.working_dir()?)?;
let installed_repo = composer.repository_manager().local_repository();
- let dm = composer.download_manager();
+ let dm = composer.download_manager().lock().await;
let im = composer.installation_manager();
let mut errors = Vec::new();