From 8aef7194e97d067ee406af95c52992fae24ca51e Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 27 Oct 2020 19:29:37 +0200 Subject: [PATCH] Hide version check on dev mode --- app/tasks/doctor.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/tasks/doctor.php b/app/tasks/doctor.php index 0836628bde..0ab19f290e 100644 --- a/app/tasks/doctor.php +++ b/app/tasks/doctor.php @@ -219,15 +219,14 @@ $cli Console::log(''); $version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost').'/v1/health/version'), true); - if($version && isset($version['version'])) { + if ($version && isset($version['version']) && App::isProduction()) { if(\version_compare($version['version'], App::getEnv('_APP_VERSION', 'UNKNOWN')) === 0) { Console::info('You are running the latest version of '.APP_NAME.'! 🥳'); } else { Console::info('A new version ('.$version['version'].') is available! 🥳'."\n"); } - } - else { + } else { Console::error('Failed to check for a newer version'."\n"); } } catch (\Throwable $th) {