Fix PHPUnit test on Windows, ignore calling linux system util for other OS

This commit is contained in:
crazywhalecc
2025-08-01 01:53:38 +08:00
parent 451de4a6f6
commit 6b23f4b34a
3 changed files with 13 additions and 2 deletions

View File

@@ -99,8 +99,11 @@ class SPCTarget
*/
public static function getLibcVersion(): ?string
{
$libc = self::getLibc();
return SystemUtil::getLibcVersionIfExists($libc);
if (PHP_OS_FAMILY === 'Linux') {
$libc = self::getLibc();
return SystemUtil::getLibcVersionIfExists($libc);
}
return null;
}
/**