File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ BUILD_CLANG=${BUILD_CLANG:-no}
4444BUILD_JAVA=${BUILD_JAVA:- no}
4545INTERACTIVE=${INTERACTIVE:- yes}
4646ONLY_SETUP_OPAM=${ONLY_SETUP_OPAM:- no}
47- # do not set INFER_OPAM_SWITCH by default
47+ INFER_OPAM_SWITCH= ${INFER_OPAM_SWITCH :- $INFER_OPAM_SWITCH_DEFAULT }
4848ORIG_ARGS=" $* "
4949
5050while [[ $# > 0 ]]; do
@@ -152,10 +152,11 @@ install_opam_deps () {
152152
153153echo " initializing opam... "
154154check_installed opam
155- if [ -z $INFER_OPAM_SWITCH ]; then
156- # the user didn't pass an opam switch explicitly, set up a custom switch for infer
157- INFER_OPAM_SWITCH=$INFER_OPAM_SWITCH_DEFAULT
155+ if [ " $INFER_OPAM_SWITCH " = " $INFER_OPAM_SWITCH_DEFAULT " ]; then
156+ # set up the custom infer switch
158157 setup_opam
158+ else
159+ opam switch set -j $NCPU $INFER_OPAM_SWITCH
159160fi
160161eval $( SHELL=bash opam config env --switch=$INFER_OPAM_SWITCH )
161162echo " installing infer dependencies... "
You can’t perform that action at this time.
0 commit comments