[infer] Reinstall some packages when ocamlfind cannot find it

Reviewed By: ezgicicek

Differential Revision: D21885300

fbshipit-source-id: 0730c90fd
master
Sungkeun Cho 5 years ago committed by Facebook GitHub Bot
parent 358c8b34ac
commit 7471b5291a

@ -68,3 +68,12 @@ opam_switch_create_if_needed () {
} }
opam_require_version_2 opam_require_version_2
# removes packages that cannot be found by ocamlfind
opam_remove_broken_package () {
local pkg="$1"
if ! ocamlfind query "${pkg}"; then
echo "ocamlfind cannot find ${pkg} package. Removing the package..."
opam remove "${pkg}" || true
fi
}

Loading…
Cancel
Save