mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
Full spell for SPC_DOWNLOAD
This commit is contained in:
@@ -243,7 +243,7 @@ class DownloadCommand extends BaseCommand
|
||||
// find filename in asset list
|
||||
if (($url = $this->findPreBuilt($pre_built_libs, $find)) !== null) {
|
||||
logger()->info("[{$ni}/{$cnt}] Downloading pre-built content {$source}");
|
||||
Downloader::downloadSource($source, ['type' => 'url', 'url' => $url], $force_all || in_array($source, $force_list), SPC_DOWN_PRE_BUILT);
|
||||
Downloader::downloadSource($source, ['type' => 'url', 'url' => $url], $force_all || in_array($source, $force_list), SPC_DOWNLOAD_PRE_BUILT);
|
||||
continue;
|
||||
}
|
||||
logger()->warning("Pre-built content not found for {$source}, fallback to source download");
|
||||
|
||||
@@ -49,7 +49,7 @@ class PackLibCommand extends BuildCommand
|
||||
// Get lock info
|
||||
$lock = json_decode(file_get_contents(DOWNLOAD_PATH . '/.lock.json'), true) ?? [];
|
||||
$source = Config::getLib($lib->getName(), 'source');
|
||||
if (!isset($lock[$source]) || ($lock[$source]['lock_as'] ?? SPC_DOWN_SOURCE) === SPC_DOWN_PRE_BUILT) {
|
||||
if (!isset($lock[$source]) || ($lock[$source]['lock_as'] ?? SPC_DOWNLOAD_SOURCE) === SPC_DOWNLOAD_PRE_BUILT) {
|
||||
logger()->critical("The library {$lib->getName()} is downloaded as pre-built, we need to build it instead of installing pre-built.");
|
||||
return static::FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user