mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 22:15:35 +00:00
feat: enhance prerequisite validation to return detailed results
This commit is contained in:
1 parent
01957f2752
commit
29135e00ba
7 files changed
+95
-21
No files matched your search
@@ -322,13 +322,14 @@ class Index extends Component
|
||||
|
||||
try {
|
||||
// Check prerequisites
|
||||
$prerequisitesInstalled = $this->createdServer->validatePrerequisites();
|
||||
if (! $prerequisitesInstalled) {
|
||||
$validationResult = $this->createdServer->validatePrerequisites();
|
||||
if (! $validationResult['success']) {
|
||||
$this->createdServer->installPrerequisites();
|
||||
// Recheck after installation
|
||||
$prerequisitesInstalled = $this->createdServer->validatePrerequisites();
|
||||
if (! $prerequisitesInstalled) {
|
||||
throw new \Exception('Prerequisites (git, curl, jq) could not be installed. Please install them manually.');
|
||||
$validationResult = $this->createdServer->validatePrerequisites();
|
||||
if (! $validationResult['success']) {
|
||||
$missingCommands = implode(', ', $validationResult['missing']);
|
||||
throw new \Exception("Prerequisites ({$missingCommands}) could not be installed. Please install them manually.");
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
Reference in new issue
Block a user