diff --git a/src/Commands/InstallCommand.php b/src/Commands/InstallCommand.php index fb26c62..f52922d 100644 --- a/src/Commands/InstallCommand.php +++ b/src/Commands/InstallCommand.php @@ -36,7 +36,12 @@ public function handle(): void View::render('components.new-line'); - $this->addEnvKeys('.env'); + $optionalEnv = $this->option('env') ?: ''; + $envFile = '.env'; + if ($optionalEnv) { + $envFile .= '.'.$optionalEnv; + } + $this->addEnvKeys($envFile); $this->addEnvKeys('.env.example'); View::render('components.new-line'); @@ -47,7 +52,7 @@ public function handle(): void View::render('components.badge', [ 'type' => 'INFO', - 'content' => 'Open your .env and add your OpenAI API key and organization id.', + 'content' => 'Open your '.$envFile.' and add your OpenAI API key and organization id.', ]); if ($wantsToSupport) {