aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/create_project_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/create_project_command.rs')
-rw-r--r--crates/shirabe/src/command/create_project_command.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs
index a907bc09..1e289b08 100644
--- a/crates/shirabe/src/command/create_project_command.rs
+++ b/crates/shirabe/src/command/create_project_command.rs
@@ -1008,20 +1008,26 @@ impl CreateProjectCommand {
let project_installer = ProjectInstaller::new(&directory, dm.clone(), fs);
let installation_manager = composer.get_installation_manager().clone();
- let mut im = installation_manager.borrow_mut();
- im.set_output_progress(!no_progress);
- im.add_installer(Box::new(project_installer));
+ {
+ let mut im = installation_manager.borrow_mut();
+ im.set_output_progress(!no_progress);
+ im.add_installer(Box::new(project_installer));
+ }
let installed_repo = crate::repository::InstalledRepositoryInterfaceHandle::new(
InstalledArrayRepository::new()?,
);
- im.execute(
+ // A shared borrow: plugin registration inside execute re-enters this manager handle
+ // through the Composer graph.
+ installation_manager.borrow().execute(
&installed_repo,
vec![InstallOperation::new(package.clone()).into()],
true,
true,
false,
)?;
- im.notify_installs(io.clone());
+ installation_manager
+ .borrow_mut()
+ .notify_installs(io.clone());
// collect suggestions
self.suggested_packages_reporter