Skip to content

Commit

Permalink
Abort if creating an environment called "testing" (#249)
Browse files Browse the repository at this point in the history
* Abort if creating an environment called "test"

* Update EnvCommand.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
luanfreitasdev and taylorotwell authored Jan 30, 2024
1 parent 0563148 commit 33980da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Commands/EnvCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public function handle()
{
Helpers::ensure_api_token_is_available();

if ($this->argument('environment') === 'testing') {
Helpers::abort('This environment name is reserved by Vapor. Please choose another environment name.');
}

$this->vapor->createEnvironment(
Manifest::id(),
$environment = $this->argument('environment'),
Expand Down

0 comments on commit 33980da

Please sign in to comment.