From 294030ca0427fb168292673b3150852c19e2692e Mon Sep 17 00:00:00 2001 From: Vladislav Manchev Date: Wed, 23 Mar 2016 02:17:32 +0200 Subject: [PATCH] Fix Travis failures due to redirects when downloading PhantomJS. --- provision.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/provision.py b/provision.py index 7ccb1f8680..4b7eac0e58 100644 --- a/provision.py +++ b/provision.py @@ -40,6 +40,7 @@ APT_DEPENDENCIES = { "ca-certificates", # Explicit dependency in case e.g. wget is already installed "puppet", # Used by lint-all "gettext", # Used by makemessages i18n + "curl", # Used for fetching PhantomJS as wget occasionally fails on redirects ] } @@ -124,7 +125,7 @@ def main(): PHANTOMJS_URL = "https://bitbucket.org/ariya/phantomjs/downloads/%s" % (PHANTOMJS_TARBALL_BASENAME,) sh.mkdir("-p", PHANTOMJS_PATH, **LOUD) if not os.path.exists(PHANTOMJS_TARBALL): - sh.wget(PHANTOMJS_URL, output_document=PHANTOMJS_TARBALL, **LOUD) + sh.curl('-J', '-L', PHANTOMJS_URL, o=PHANTOMJS_TARBALL, **LOUD) sh.tar("xj", directory=PHANTOMJS_PATH, file=PHANTOMJS_TARBALL, **LOUD) sh.ln("-sf", os.path.join(PHANTOMJS_PATH, PHANTOMJS_BASENAME, "bin", "phantomjs"), "/usr/local/bin/phantomjs", **LOUD)