Skip to content

Commit a2f1dc0

Browse files
committed
show erro if .env is not available
1 parent 83624ca commit a2f1dc0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Console/Commands/SetEnvCommand.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ public function handle()
7171
}
7272

7373
// Load the .env
74-
$app_env = DotenvEditor::load();
74+
try {
75+
$app_env = DotenvEditor::load();
76+
}
77+
catch (\Exception $exception)
78+
{
79+
$this->error($exception->getMessage());
80+
exit();
81+
}
82+
7583

7684
// Now apply the user vars
7785
foreach ($user_keys as $user_key => $user_value)

0 commit comments

Comments
 (0)