mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 10:25:36 +08:00
Fix redundant pre-built name calling
This commit is contained in:
@@ -211,7 +211,7 @@ class SystemUtil
|
|||||||
// Match Version * line
|
// Match Version * line
|
||||||
// match ldd version: "Version 1.2.3" match 1.2.3
|
// match ldd version: "Version 1.2.3" match 1.2.3
|
||||||
$pattern = '/Version\s+(\d+\.\d+\.\d+)/';
|
$pattern = '/Version\s+(\d+\.\d+\.\d+)/';
|
||||||
if (preg_match($pattern, $result[1][1], $matches)) {
|
if (preg_match($pattern, $result[1][1] ?? '', $matches)) {
|
||||||
return $matches[1];
|
return $matches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -654,8 +654,8 @@ class Downloader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If lock file exists for current arch and glibc target, skip downloading
|
// If lock file exists for current arch and glibc target, skip downloading
|
||||||
$lock_name = self::getPreBuiltLockName($name);
|
|
||||||
if (!$force && $download_as === SPC_DOWN_PRE_BUILT && isset($lock[$lock_name])) {
|
if (!$force && $download_as === SPC_DOWN_PRE_BUILT && isset($lock[$lock_name = self::getPreBuiltLockName($name)])) {
|
||||||
// lock name with env
|
// lock name with env
|
||||||
if (
|
if (
|
||||||
$lock[$lock_name]['source_type'] === 'archive' && file_exists(DOWNLOAD_PATH . '/' . $lock[$lock_name]['filename']) ||
|
$lock[$lock_name]['source_type'] === 'archive' && file_exists(DOWNLOAD_PATH . '/' . $lock[$lock_name]['filename']) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user