diff --git a/src/Joomlatools/Composer/ExtensionInstaller.php b/src/Joomlatools/Composer/ExtensionInstaller.php index b10b05e..004fc7f 100644 --- a/src/Joomlatools/Composer/ExtensionInstaller.php +++ b/src/Joomlatools/Composer/ExtensionInstaller.php @@ -33,9 +33,7 @@ public function __construct(IOInterface $io) public function execute() { - $isStandalone = Util::isStandalone(); - - if ($isStandalone){ + if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform()) { return true; } diff --git a/src/Joomlatools/Composer/Plugin.php b/src/Joomlatools/Composer/Plugin.php index b9a2a11..b6253a8 100644 --- a/src/Joomlatools/Composer/Plugin.php +++ b/src/Joomlatools/Composer/Plugin.php @@ -40,7 +40,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface */ public function activate(Composer $composer, IOInterface $io) { - if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform() && !Util::isStandalone()) { + if (!Util::isJoomla() && !Util::isJoomlatoolsPlatform()) { throw new \RuntimeException('Working directory is not a valid install destination'); } diff --git a/src/Joomlatools/Joomla/Util.php b/src/Joomlatools/Joomla/Util.php index 5274fed..48c8bcf 100644 --- a/src/Joomlatools/Joomla/Util.php +++ b/src/Joomlatools/Joomla/Util.php @@ -24,27 +24,6 @@ public static function getPlatformName() return static::isJoomlatoolsPlatform() ? 'Joomlatools Platform' : 'Joomla'; } - /** - * Validate if the current working directory is a Standalone app - * - * @return bool - */ - public static function isStandalone() - { - $directories = array('./components', './web'); - - foreach ($directories as $directory) - { - $path = realpath($directory); - - if (!file_exists($path)){ - return false; - } - } - - return true; - } - /** * Validate if the current working directory has a valid Joomla installation *