Skip to content

Commit b42532a

Browse files
committed
Merge branch 'main' into staging/1.4.6
2 parents 61dd100 + d657f5a commit b42532a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ All notable changes to this project will be documented in this file.
1414
- Fixed #1956 to prevent reset of defined webmail client.
1515
- Explicitly disable cron reports #1978
1616
- Fixed an issue where in rare cases certificate failed to install @dpeca and @myvesta
17-
- Merge LE logs in 1 file per domain #1968 @tlcd96
18-
- Refresh phpmyadmin config for Apache2 + PHP FPM
19-
- Mute notification mysql is down with v-update-sys-rrd-mysql
20-
- Fixed an issue with v-change-web-domain-backed-tpl and username = domain.com #1799
17+
- Fixed an issue where composer failed to install when .composer folder is missing
2118

2219
## [1.4.5] - Service release
2320

web/src/app/System/HestiaApp.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ public function installComposer($version)
6969
}
7070

7171
$install_folder = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.composer';
72+
73+
if (!file_exists($install_folder)) {
74+
exec(HESTIA_CMD .'v-rebuild-user '.$this -> user(), $output, $return_code);
75+
if($return_code !== 0){
76+
throw new \Exception("Unable to rebuild user");
77+
}
78+
}
79+
7280
$this->runUser('v-run-cli-cmd', ["/usr/bin/php", $composer_setup, "--quiet", "--install-dir=".$install_folder, "--filename=composer", "--$version" ], $status);
7381

7482
unlink($composer_setup);

0 commit comments

Comments
 (0)