[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
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent 84ff14f2e7
commit 1694d21ed7

@ -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"
}

Loading…
Cancel
Save