Accurate deployment statuses (#168)

This commit is contained in:
Saeed Vaziry
2024-04-21 16:26:26 +02:00
committed by GitHub
parent e2dd9177f7
commit f0da1c6d8c
11 changed files with 88 additions and 35 deletions

View File

@ -3,6 +3,7 @@
namespace App\Models;
use App\Exceptions\SourceControlIsNotConnected;
use App\Exceptions\SSHError;
use App\SiteTypes\SiteType;
use App\SSH\Services\Webserver\Webserver;
use Illuminate\Database\Eloquent\Factories\HasFactory;
@ -271,6 +272,10 @@ public function hasFeature(string $feature): bool
public function getEnv(): string
{
return $this->server->os()->readFile($this->path.'/.env');
try {
return $this->server->os()->readFile($this->path.'/.env');
} catch (SSHError) {
return '';
}
}
}