Skip to content

Commit e3e7aea

Browse files
committed
Add error message and return value instead of throwing
1 parent bd6708b commit e3e7aea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Console/EnvPush.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ public function handle(): int
4646
$this->decrypt = true;
4747
}
4848

49-
if (!file_exists('.env.' . $this->stage)) {
50-
throw new InvalidArgumentException("'.env.$this->stage' doesn't exists.");
49+
if (!file_exists(".env.$this->stage")) {
50+
$this->error("'.env.$this->stage' doesn't exists.");
51+
return self::FAILURE;
5152
}
5253

5354
$localEnvs = $this->getEnvironmentVarsFromFile();

0 commit comments

Comments
 (0)