diff --git a/src/ExtensionInstaller.php b/src/ExtensionInstaller.php index 618b3e5..3ea5a77 100644 --- a/src/ExtensionInstaller.php +++ b/src/ExtensionInstaller.php @@ -36,9 +36,15 @@ protected function setRoundcubemailInstallPath(InstalledRepositoryInterface $ins if ($roundcubemailPackage === $rootPackage) { // $this->getInstallPath($package) does not work for root package $this->initializeVendorDir(); - $this->roundcubemailInstallPath = dirname($this->vendorDir); + $installPath = dirname($this->vendorDir); } else { - $this->roundcubemailInstallPath = $this->getInstallPath($roundcubemailPackage); + $installPath = $this->getInstallPath($roundcubemailPackage); + } + + if ($this->roundcubemailInstallPath === null) { + $this->roundcubemailInstallPath = $installPath; + } elseif ($this->roundcubemailInstallPath !== $installPath) { + throw new \Exception('Install path of "roundcube/roundcubemail" package has unexpectedly changed'); } }