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'))) {