Skip to content

Commit

Permalink
Spaces and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Nov 12, 2023
1 parent 8dd0258 commit f08b0d5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/LagoonCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ public function getJwtToken() {
}

$ssh->setTimeout($this->sshTimeout);

try {
$ssh->mustRun();
$ssh->mustRun();
} catch (ProcessFailedException $exception) {
$this->logger->debug($ssh->getMessage());
}
Expand Down Expand Up @@ -277,6 +277,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 f08b0d5

Please sign in to comment.