@@ -14,10 +14,7 @@ All notable changes to this project will be documented in this file.
- Fixed #1956 to prevent reset of defined webmail client.
- Explicitly disable cron reports #1978
- Fixed an issue where in rare cases certificate failed to install @dpeca and @myvesta
-- Merge LE logs in 1 file per domain #1968 @tlcd96
-- Refresh phpmyadmin config for Apache2 + PHP FPM
-- Mute notification mysql is down with v-update-sys-rrd-mysql
-- Fixed an issue with v-change-web-domain-backed-tpl and username = domain.com #1799
+- Fixed an issue where composer failed to install when .composer folder is missing
## [1.4.5] - Service release
@@ -69,6 +69,14 @@ class HestiaApp {
}
$install_folder = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.composer';
+
+ if (!file_exists($install_folder)) {
+ exec(HESTIA_CMD .'v-rebuild-user '.$this -> user(), $output, $return_code);
+ if($return_code !== 0){
+ throw new \Exception("Unable to rebuild user");
+ }
$this->runUser('v-run-cli-cmd', ["/usr/bin/php", $composer_setup, "--quiet", "--install-dir=".$install_folder, "--filename=composer", "--$version" ], $status);
unlink($composer_setup);