When env was no set then dont try to collect vars from it

(cherry picked from commit fa8ad15fdd691fb4ea5db431062e89b512a9d526)
This commit is contained in:
Anthony Axenov 2023-08-13 11:01:31 +08:00
parent fb7b4baa32
commit 1f7816c917
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -229,6 +229,9 @@ class Processor
*/
protected function initEnv(): void
{
if (!isset($this->envFile)) {
return;
}
$content = file_get_contents(FileSystem::normalizePath($this->envFile));
$content = json_decode($content, flags: JSON_THROW_ON_ERROR);
if (!property_exists($content, 'environment') || empty($content?->environment)) {