Try opam update when opam fails to init or install deps

Reviewed By: jeremydubreil

Differential Revision: D5334889

fbshipit-source-id: da2e116
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent 7a570cdebf
commit 9432a810ca

@ -180,7 +180,7 @@ setup_opam || opam_failed 'opam setup'
eval $(SHELL=bash opam config env --switch=$INFER_OPAM_SWITCH) eval $(SHELL=bash opam config env --switch=$INFER_OPAM_SWITCH)
echo >&2 echo >&2
echo "installing infer dependencies; this can take up to 30 minutes... " >&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 if [ "$ONLY_SETUP_OPAM" = "yes" ]; then
exit 0 exit 0

Loading…
Cancel
Save