Skip to content

Commit

Permalink
Allow curl to fail when file 404s
Browse files Browse the repository at this point in the history
I guess we run with set -e and curl returns 1 when the file is 404.
So this version always returns true from the curl, and we don't exit.
Fixes #457.
  • Loading branch information
kwinkunks committed Jan 10, 2024
1 parent d3b73d2 commit 1fcbede
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/testkomodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ start_tests () {

start_integration_test () {

chromium_version=$(chromium-browser --version | grep -zoP '\d+\.\d+\.\d+\.\d+')
chromium_minor_version=$(echo $chromium_version | grep -zoP '^\d+\.\d+\.\d+')
chromium_version=$(chromium-browser --version | grep -oP '\d+\.\d+\.\d+\.\d+')
chromium_minor_version=$(echo $chromium_version | grep -oP '^\d+\.\d+\.\d+')

# Sometimes the chromium-browser has no matching chromedriver.
# Check for HTTP 404 error
download_url="https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$chromium_version/linux64/chromedriver-linux64.zip"
download_status=$(curl --head "$download_url" | grep 'HTTP/2 200')
download_status=$((curl --head "$download_url" || true) | grep -oP 'HTTP/.+? 200 OK')
driver_version=$chromium_version
if [[ -z "$download_status" ]]; then
Expand Down

0 comments on commit 1fcbede

Please # to comment.