fail hard when github is down

Summary:public
Sometimes github is down, and replies with an error page, which is not a good
substitute for an opam binary. Failing makes docker not cache the result, so
it's easy to try again when github gets better.

Reviewed By: cristianoc

Differential Revision: D3138561

fb-gh-sync-id: 6725c42
fbshipit-source-id: 6725c42
master
Jules Villard 9 years ago committed by Facebook Github Bot 0
parent bbd09d39dd
commit f250a103f3

@ -30,10 +30,13 @@ RUN apt-get update && \
zlib1g-dev
# Install OPAM
RUN curl -sL \
https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-Linux \
RUN VERSION=1.2.2; \
curl -sL \
https://github.com/ocaml/opam/releases/download/$VERSION/opam-$VERSION-x86_64-Linux \
-o /usr/local/bin/opam && \
chmod 755 /usr/local/bin/opam
chmod 755 /usr/local/bin/opam && \
((/usr/local/bin/opam --version | grep -q $VERSION) || \
(echo "failed to download opam from GitHub."; exit 1))
RUN opam init -y --comp=4.02.3
# Download the latest Infer release

Loading…
Cancel
Save