Skip to content

Commit

Permalink
Unbreak build when no system ocaml installed
Browse files Browse the repository at this point in the history
Summary:
If ocaml is not installed (or if homebrew has sandboxed it out), `opam
init` fails unless passed `--compiler`.

Reviewed By: sblackshear, jvillard

Differential Revision: D3927532

fbshipit-source-id: d2fbec9
  • Loading branch information
jberdine authored and Facebook Github Bot 3 committed Sep 28, 2016
1 parent e38e16c commit 32d8036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-infer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ check_installed () {
setup_opam () {
OCAML_VERSION="4.02.3"

opam init -j $NCPU --no-setup --yes
opam init --compiler=$OCAML_VERSION -j $NCPU --no-setup --yes

OPAMSWITCH=infer-$OCAML_VERSION
opam switch install -j $NCPU $OPAMSWITCH --alias-of $OCAML_VERSION || true
opam switch set -j $NCPU $OPAMSWITCH --alias-of $OCAML_VERSION
}

add_opam_git_pin () {
Expand Down

0 comments on commit 32d8036

Please sign in to comment.