installation fix

This commit is contained in:
Akolzin Dmitry 2020-04-10 11:51:17 +03:00
parent 41da8fe862
commit ce07e06b55

View File

@ -112,12 +112,11 @@ class RoboFile extends \Robo\Tasks
$this->printTaskError("<error> Could not connect ot database...");
}
if (version_compare(getenv('OPENCART'), '3.0.2.0', '<=')) {
$install_code = file_get_contents($this->root_dir . 'www/install/cli_install.php');
$storage = <<<EOF
define('DIR_MODIFICATION', DIR_SYSTEM . 'modification/');
if (!defined('DIR_STORAGE')) {
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
}
EOF;
@ -125,6 +124,7 @@ EOF;
$this->root_dir . 'www/install/cli_install.php',
str_replace("define('DIR_MODIFICATION', DIR_SYSTEM . 'modification/');", $storage, $install_code)
);
}
$install = $this->taskExec('php')->arg($this->root_dir . 'www/install/cli_install.php')->arg('install');
foreach ($this->opencart_config as $option => $value) {