Scripts: make opam env invocation more robust

Tells `opam env` to explicitly use the init script for `sh`, which prevents it
from picking an incompatible script for another shell. In particular, the init
script for `fish` makes no sense when evaluated in `sh`.
This commit is contained in:
Michael Sproul 2018-07-08 16:12:32 +10:00 committed by Grégoire Henry
parent 9e2f8ba866
commit 2c28d3b202

View File

@ -22,7 +22,7 @@ if [ ! -d "$src_dir/_opam" ] ; then
exit 1
fi
eval $(opam env)
eval $(opam env --shell=sh)
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
opam install --unlock-base ocaml-base-compiler.$ocaml_version