From 1694d21ed74114510fe6a884c83363dca941eace Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 14 Sep 2020 03:57:54 -0700 Subject: [PATCH] [opam] retry switch creation with opam update Summary: When the switch changes to a new version of ocaml, opam may need updating to see the new compiler version. Reviewed By: jberdine Differential Revision: D23678520 fbshipit-source-id: de1205de6 --- build-infer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-infer.sh b/build-infer.sh index 9a6b55290..0219482ac 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -123,7 +123,7 @@ fi setup_opam () { opam var root 1>/dev/null 2>/dev/null || opam init --reinit --bare --no-setup && - opam_switch_create_if_needed "$INFER_OPAM_SWITCH" "$INFER_OPAM_COMPILER" && + opam_retry opam_switch_create_if_needed "$INFER_OPAM_SWITCH" "$INFER_OPAM_COMPILER" && opam switch set "$INFER_OPAM_SWITCH" }