* Fixed an issue when .composer folder does not exitsts Install of composer failed when .composer is missing * Fix markup
@@ -11,6 +11,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
+- 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);