Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(init): improve error handling for deployment and template pulling processes

Andras Bacsaiea5b33b92327
diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.php
index 3d61a09355..b858292560 100644
--- a/app/Console/Commands/Init.php
+++ b/app/Console/Commands/Init.php
@@ -68,23 +68,43 @@ class Init extends Command
if (isCloud()) {
try {
- $this->cleanupUnnecessaryDynamicProxyConfiguration();
+ $this->cleanupInProgressApplicationDeployments();
+ } catch (\Throwable $e) {
+ echo "Could not cleanup inprogress deployments: {$e->getMessage()}\n";
+ }
+
+ try {
$this->pullTemplatesFromCDN();
- $this->pullChangelogFromGitHub();
} catch (\Throwable $e) {
echo "Could not pull templates from CDN: {$e->getMessage()}\n";
}
+ try {
+ $this->pullChangelogFromGitHub();
+ } catch (\Throwable $e) {
+ echo "Could not changelogs from github: {$e->getMessage()}\n";
+ }
+
return;
}
try {
$this->cleanupInProgressApplicationDeployments();
+ } catch (\Throwable $e) {
+ echo "Could not cleanup inprogress deployments: {$e->getMessage()}\n";
+ }
+
+ try {
$this->pullTemplatesFromCDN();
- $this->pullChangelogFromGitHub();
} catch (\Throwable $e) {
echo "Could not pull templates from CDN: {$e->getMessage()}\n";
}
+
+ try {
+ $this->pullChangelogFromGitHub();
+ } catch (\Throwable $e) {
+ echo "Could not changelogs from github: {$e->getMessage()}\n";
+ }
try {
$localhost = $this->servers->where('id', 0)->first();
$localhost->setupDynamicProxyConfiguration();