Retry the Clojure installer download in CI

A transient CDN timeout handed bash a 2-minute HTML error page instead of
linux-install.sh and failed the run. curl now fails on HTTP errors and
retries, and the script is sanity-checked before running.
This commit is contained in:
Yogthos 2026-07-02 14:16:47 -04:00
parent b2aa757af2
commit ab10e68218

View file

@ -56,7 +56,11 @@ jobs:
- name: Install JDK + Clojure (certify oracle) - name: Install JDK + Clojure (certify oracle)
run: | run: |
sudo apt-get install -y default-jdk rlwrap sudo apt-get install -y default-jdk rlwrap
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh # --retry + --fail so a transient CDN error retries instead of handing
# bash an HTML error page (a 2min timeout page flaked a run)
curl --fail --retry 5 --retry-delay 10 --retry-all-errors -L -O \
https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
head -1 linux-install.sh | grep -q '^#!' || { echo "installer download corrupt"; cat linux-install.sh | head -5; exit 1; }
sudo bash linux-install.sh sudo bash linux-install.sh
clojure --version clojure --version