diff --git a/PHPCI/Controller/PluginController.php b/PHPCI/Controller/PluginController.php index 45aed22f..c4910f34 100644 --- a/PHPCI/Controller/PluginController.php +++ b/PHPCI/Controller/PluginController.php @@ -76,7 +76,10 @@ class PluginController extends \PHPCI\Controller $this->setComposerJson($json); if ($this->canInstall) { - shell_exec('COMPOSER_HOME='.APPLICATION_PATH . ' ' . $this->composerPath . ' update --working-dir=' . APPLICATION_PATH . ' > /' . APPLICATION_PATH . '/phpci_composer_remove.log 2>&1 &'); + $home = 'COMPOSER_HOME='.APPLICATION_PATH . ' '; + $action = ' update --working-dir=' . APPLICATION_PATH; + $toLog = APPLICATION_PATH . '/phpci_composer_remove.log 2>&1 &'; + shell_exec($home . $this->composerPath . $action . ' > /' . $toLog); } header('Location: ' . PHPCI_URL . 'plugin?r=' . $package); @@ -101,7 +104,10 @@ class PluginController extends \PHPCI\Controller $this->setComposerJson($json); if ($this->canInstall) { - shell_exec('COMPOSER_HOME='.APPLICATION_PATH . ' ' . $this->composerPath . ' update --working-dir=' . APPLICATION_PATH . ' > /' . APPLICATION_PATH . '/phpci_composer_install.log 2>&1 &'); + $home = 'COMPOSER_HOME='.APPLICATION_PATH . ' '; + $action = ' update --working-dir=' . APPLICATION_PATH; + $toLog = ' > /' . APPLICATION_PATH . '/phpci_composer_install.log 2>&1 &'; + shell_exec($home . $this->composerPath . $action . $toLog); header('Location: ' . PHPCI_URL . 'plugin?i=' . $package); die;