diff options
Diffstat (limited to 'crates/shirabe')
| -rw-r--r-- | crates/shirabe/src/installer/plugin_installer.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/shirabe/src/installer/plugin_installer.rs b/crates/shirabe/src/installer/plugin_installer.rs index 132d408..7ff5eb3 100644 --- a/crates/shirabe/src/installer/plugin_installer.rs +++ b/crates/shirabe/src/installer/plugin_installer.rs @@ -58,8 +58,16 @@ impl PluginInstaller { } fn get_plugin_manager(&self) -> std::rc::Rc<std::cell::RefCell<PluginManager>> { - // TODO(plugin): PartialComposer does not expose PluginManager; revisit when wiring plugin support - todo!("PartialComposer.get_plugin_manager") + // PHP asserts that $this->composer is instance of fully-loaded Composer, and throws a + // LogicException if not. In Rust, just panic!. + self.inner + .composer + .upgrade() + .expect("Composer handle dropped") + .as_full() + .expect("PluginInstaller should be initialized with a fully loaded Composer instance.") + .borrow() + .get_plugin_manager() } } |
