Skip to content

Commit dc5de5d

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: gen_stub: Fix php-parser package download (#20775)
2 parents 9de37a3 + 7d4ba80 commit dc5de5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/gen_stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6048,9 +6048,10 @@ function installPhpParser(string $version, string $phpParserDir) {
60486048
chdir(__DIR__);
60496049

60506050
$tarName = "v$version.tar.gz";
6051-
passthru("wget https://github.com/nikic/PHP-Parser/archive/$tarName", $exit);
6051+
$downloadUrl = "https://github.com/nikic/PHP-Parser/archive/$tarName";
6052+
passthru("wget -O $tarName $downloadUrl", $exit);
60526053
if ($exit !== 0) {
6053-
passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/$tarName", $exit);
6054+
passthru("curl -LO $downloadUrl", $exit);
60546055
}
60556056
if ($exit !== 0) {
60566057
throw new Exception("Failed to download PHP-Parser tarball");
@@ -6060,6 +6061,7 @@ function installPhpParser(string $version, string $phpParserDir) {
60606061
}
60616062
passthru("tar xvzf $tarName -C PHP-Parser-$version --strip-components 1", $exit);
60626063
if ($exit !== 0) {
6064+
rmdir($phpParserDir);
60636065
throw new Exception("Failed to extract PHP-Parser tarball");
60646066
}
60656067
unlink(__DIR__ . "/$tarName");

0 commit comments

Comments
 (0)