From 0f8ca45110989d4e5a7925d2ab79a1088c7c1ff6 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Wed, 28 Aug 2019 10:48:32 -0400 Subject: [PATCH] fix for default command environment --- src/SelfDiagnosisCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SelfDiagnosisCommand.php b/src/SelfDiagnosisCommand.php index 45c5112..2766c55 100644 --- a/src/SelfDiagnosisCommand.php +++ b/src/SelfDiagnosisCommand.php @@ -27,7 +27,7 @@ public function handle() { $this->runChecks(config('self-diagnosis.checks', []), trans('self-diagnosis::commands.self_diagnosis.common_checks')); - $environment = $this->argument('environment', app()->environment()); + $environment = $this->argument('environment') ?: app()->environment(); $environmentChecks = config('self-diagnosis.environment_checks.' . $environment, []); if (empty($environmentChecks) && array_key_exists($environment, config('self-diagnosis.environment_aliases'))) {