Skip to content

Commit

Permalink
Spaces and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko authored and tobybellwood committed Aug 28, 2024
1 parent 3297004 commit f946f88
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/LagoonCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ public function getLagoonEnvs() {
private function isLagoonEnvironment() {
return !empty(getenv("LAGOON"));
}

/**
* This should be run before any Lagoon commands.
* Checks whether we have a valid environment before running.
*
* @return void
*/
private function preCommandChecks() {
if($this->isLagoonEnvironment() == FALSE) {
throw new CommandFailedException(dt("Attempting to run a Lagoon command in a non-Lagoon environment."));
Expand Down

0 comments on commit f946f88

Please sign in to comment.