From 9432a810caf3982f197f6cf28d655d8bb0d9f706 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 27 Jun 2017 18:09:50 -0700 Subject: [PATCH] Try opam update when opam fails to init or install deps Reviewed By: jeremydubreil Differential Revision: D5334889 fbshipit-source-id: da2e116 --- build-infer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-infer.sh b/build-infer.sh index 0e6de6c3d..3f29c8c7b 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -180,7 +180,7 @@ setup_opam || opam_failed 'opam setup' eval $(SHELL=bash opam config env --switch=$INFER_OPAM_SWITCH) echo >&2 echo "installing infer dependencies; this can take up to 30 minutes... " >&2 -install_opam_deps || opam_failed 'installing opam dependencies' +install_opam_deps || (opam update && install_opam_deps) || opam_failed 'installing opam dependencies' if [ "$ONLY_SETUP_OPAM" = "yes" ]; then exit 0