diff options
author | Stephen Reay <stephen.reay@me.com> | 2019-08-10 20:10:16 +0700 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-08-10 16:21:03 +0200 |
commit | 9c02c584819369b7e1fd1ab515a2e5c411355b11 (patch) | |
tree | fad85e1f6f3de100325f2479d8938a6ff7c4ec20 /scripts | |
parent | 17987da884f8ff1147f4804ce42622a001eb7210 (diff) | |
download | php-git-9c02c584819369b7e1fd1ab515a2e5c411355b11.tar.gz |
Fallback to curl in gen_stub if wget fails
Closes GH-4502.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dev/gen_stub.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/dev/gen_stub.php b/scripts/dev/gen_stub.php index 993be075d7..f61893050c 100755 --- a/scripts/dev/gen_stub.php +++ b/scripts/dev/gen_stub.php @@ -384,8 +384,12 @@ function initPhpParser() { if (!is_dir($phpParserDir)) { $cwd = getcwd(); chdir(__DIR__); + passthru("wget https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); if ($exit !== 0) { + passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); + } + if ($exit !== 0) { throw new Exception("Failed to download PHP-Parser tarball"); } if (!mkdir($phpParserDir)) { |