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

Commit 1911abd

Browse files
committed
Explicitly check for 404 before trying fallback url
1 parent 544f51b commit 1911abd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/install-couchbase-server/install-couchbase-server

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function install_couchbase_on_ubuntu {
8484
sudo apt-get install -y python-httplib2
8585

8686
log_info "Downloading Couchbase from $url to $filepath"
87-
if ! curl --location --silent --fail --show-error -o "$dpkg_name" "$url"; then
87+
if [[ "$(curl --location --silent --fail --show-error -o "$dpkg_name" -w "%{http_code}" "$url")" == "404" ]]; then
8888
log_warn "Failed to get Couchbase from $url. Trying $fallback_url."
8989
curl --location --silent --fail --show-error -o "$dpkg_name" "$fallback_url"
9090
fi

0 commit comments

Comments
 (0)