aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command')
-rw-r--r--crates/shirabe/src/command/create_project_command.rs16
-rw-r--r--crates/shirabe/src/command/reinstall_command.rs4
2 files changed, 13 insertions, 7 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
diff --git a/crates/shirabe/src/command/reinstall_command.rs b/crates/shirabe/src/command/reinstall_command.rs
index 0d3567a2..05543870 100644
--- a/crates/shirabe/src/command/reinstall_command.rs
+++ b/crates/shirabe/src/command/reinstall_command.rs
@@ -247,14 +247,14 @@ impl Command for ReinstallCommand {
let repo = crate::repository::InstalledRepositoryInterfaceHandle::from_repository_handle(
&local_repo,
);
- installation_manager.borrow_mut().execute(
+ installation_manager.borrow().execute(
&repo,
uninstall_operations,
dev_mode,
true,
false,
)?;
- installation_manager.borrow_mut().execute(
+ installation_manager.borrow().execute(
&repo,
install_operations.clone(),
dev_mode,