Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit bd84119

Browse files
authored
Update test/setup_travis.sh (#19878)
* Update test/setup_travis.sh * Obtain the latest geckodriver version using a bash trick This trick comes from the repository of privacybadger EFForg/privacybadger@1550b9e
1 parent 3501c2a commit bd84119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/setup_travis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ function setup_chrome {
1717
}
1818

1919
function setup_firefox {
20-
# install the latest version of geckodriver (per Github release API)
20+
# install the latest version of geckodriver
2121
firefox_version=$("${BROWSER}" -version)
22-
geckodriver_version=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep tag_name | cut -d '"' -f 4)
22+
geckodriver_version=$(curl -sI https://github.com/mozilla/geckodriver/releases/latest | grep -i "^Location: " | sed 's/.*\///' | tr -d '\r')
2323
geckodriver_url="https://github.com/mozilla/geckodriver/releases/download/${geckodriver_version}/geckodriver-${geckodriver_version}-linux64.tar.gz"
2424

2525
echo "Setting up geckodriver ${geckodriver_version} for ${firefox_version}"

0 commit comments

Comments
 (0)