Code style fix and comment addition

This commit is contained in:
crazywhalecc
2024-07-07 21:18:30 +08:00
committed by Jerry Ma
parent 3c0eb68c70
commit c6a22fbd14
4 changed files with 3 additions and 4 deletions

View File

@@ -45,7 +45,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
if (isset($lock[$source]) && $lock[$source]['lock_as'] === SPC_LOCK_PRE_BUILT) {
if (isset($lock[$source]) && ($lock[$source]['lock_as'] ?? SPC_LOCK_SOURCE) === SPC_LOCK_PRE_BUILT) {
return $this->tryInstall($lock[$source]['filename'], $force);
}
return $this->tryBuild($force);