Cmake version check (#400)

* add cmake version checker for doctor

* fix linux distro checker message
This commit is contained in:
Jerry Ma
2024-04-02 15:05:49 +08:00
committed by GitHub
parent d3a001d808
commit da6d9ffb4b
2 changed files with 17 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ class OSCheckList
return CheckResult::fail('Current OS is not supported: ' . PHP_OS_FAMILY);
}
$distro = PHP_OS_FAMILY === 'Linux' ? (' ' . SystemUtil::getOSRelease()['dist']) : '';
$known_distro = PHP_OS_FAMILY === 'Linux' && in_array(SystemUtil::getOSRelease()['dist'], SystemUtil::getSupportedDistros());
$known_distro = PHP_OS_FAMILY !== 'Linux' || in_array(SystemUtil::getOSRelease()['dist'], SystemUtil::getSupportedDistros());
return CheckResult::ok(PHP_OS_FAMILY . ' ' . php_uname('m') . $distro . ', supported' . ($known_distro ? '' : ' (but not tested on this distro)'));
}
}