mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Accurate deployment statuses (#168)
This commit is contained in:
@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user