From 33980da986b4ea22e917dbbe04635c0d8ddb38b6 Mon Sep 17 00:00:00 2001 From: Luan Freitas <33601626+luanfreitasdev@users.noreply.github.com> Date: Tue, 30 Jan 2024 00:07:03 -0300 Subject: [PATCH] Abort if creating an environment called "testing" (#249) * Abort if creating an environment called "test" * Update EnvCommand.php --------- Co-authored-by: Taylor Otwell --- src/Commands/EnvCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Commands/EnvCommand.php b/src/Commands/EnvCommand.php index 2077523a..9c325b64 100644 --- a/src/Commands/EnvCommand.php +++ b/src/Commands/EnvCommand.php @@ -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'),