File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -268,11 +268,19 @@ protected function buildFrankenphp(): void
268268 logger ()->warning ('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli. ' );
269269 $ xcaddyModules = str_replace ('--with github.com/dunglas/caddy-cbrotli ' , '' , $ xcaddyModules );
270270 }
271- $ releaseInfo = json_decode (Downloader::curlExec (
272- 'https://api.github.com/repos/php/frankenphp/releases/latest ' ,
273- hooks: [[CurlHook::class, 'setupGithubToken ' ]],
274- retries: 3 ,
275- ), true );
271+ $ releaseInfo = false ;
272+ $ retries = 5 ;
273+ while (!$ releaseInfo && --$ retries >= 0 ) {
274+ try {
275+ $ releaseInfo = json_decode (Downloader::curlExec (
276+ 'https://api.github.com/repos/php/frankenphp/releases/latest ' ,
277+ hooks: [[CurlHook::class, 'setupGithubToken ' ]],
278+ retries: 3 ,
279+ ), true , 512 , JSON_THROW_ON_ERROR );
280+ } catch (\Exception ) {
281+ sleep (1 );
282+ }
283+ }
276284 $ frankenPhpVersion = $ releaseInfo ['tag_name ' ];
277285 $ libphpVersion = $ this ->getPHPVersion ();
278286 $ dynamic_exports = '' ;
You can’t perform that action at this time.
0 commit comments