Fixed env detection for artisan