From 9c02c584819369b7e1fd1ab515a2e5c411355b11 Mon Sep 17 00:00:00 2001 From: Stephen Reay Date: Sat, 10 Aug 2019 20:10:16 +0700 Subject: Fallback to curl in gen_stub if wget fails Closes GH-4502. --- scripts/dev/gen_stub.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') 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,7 +384,11 @@ 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"); } -- cgit v1.2.1