Add libc version for pre-built content name

This commit is contained in:
crazywhalecc
2025-03-30 20:16:41 +08:00
parent 67d2ad5511
commit 631a1b5864
8 changed files with 43 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ abstract class LibraryBase
$lock = json_decode(FileSystem::readFile(DOWNLOAD_PATH . '/.lock.json'), true) ?? [];
$source = Config::getLib(static::NAME, 'source');
// if source is locked as pre-built, we just tryInstall it
$pre_built_name = Downloader::getPreBuiltName($source);
$pre_built_name = Downloader::getPreBuiltLockName($source);
if (isset($lock[$pre_built_name]) && ($lock[$pre_built_name]['lock_as'] ?? SPC_DOWN_SOURCE) === SPC_DOWN_PRE_BUILT) {
return $this->tryInstall($lock[$pre_built_name]['filename'], $force);
}