mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
fix: throw exception
This commit is contained in:
parent
397b7fefe3
commit
622095ebc4
@ -28,15 +28,15 @@ public function handle()
|
|||||||
$this->currentVersion = config('version');
|
$this->currentVersion = config('version');
|
||||||
if (!$settings->is_auto_update_enabled) {
|
if (!$settings->is_auto_update_enabled) {
|
||||||
Log::info('Auto update is disabled');
|
Log::info('Auto update is disabled');
|
||||||
throw 'Auto update is disabled';
|
throw new \Exception('Auto update is disabled');
|
||||||
}
|
}
|
||||||
if ($this->latestVersion === $this->currentVersion) {
|
if ($this->latestVersion === $this->currentVersion) {
|
||||||
Log::info('Already on latest version');
|
Log::info('Already on latest version');
|
||||||
throw 'Already on latest version';
|
throw new \Exception('Already on latest version');
|
||||||
}
|
}
|
||||||
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
|
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
|
||||||
Log::info('Latest version is lower than current version?!');
|
Log::info('Latest version is lower than current version?!');
|
||||||
throw 'Latest version is lower than current version?!';
|
throw new \Exception('Latest version is lower than current version?!');
|
||||||
}
|
}
|
||||||
Log::info("Updating from {$this->currentVersion} -> {$this->latestVersion}");
|
Log::info("Updating from {$this->currentVersion} -> {$this->latestVersion}");
|
||||||
$this->update();
|
$this->update();
|
||||||
|
Loading…
Reference in New Issue
Block a user