mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
rename SPC_RETRY_TIME to SPC_DOWNLOAD_RETRIES to clear up what it's doing
sleep 5 seconds between retries
This commit is contained in:
@@ -34,7 +34,7 @@ class PhpSource extends CustomSourceBase
|
||||
// 查找最新的小版本号
|
||||
$info = json_decode(Downloader::curlExec(
|
||||
url: "https://www.php.net/releases/index.php?json&version={$major_version}",
|
||||
retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0)
|
||||
retries: intval(getenv('SPC_DOWNLOAD_RETRIES') ?: 0)
|
||||
), true);
|
||||
if (!isset($info['version'])) {
|
||||
throw new DownloaderException("Version {$major_version} not found.");
|
||||
|
||||
Reference in New Issue
Block a user