diff --git a/.travis.yml b/.travis.yml index 0691be9f964..cf65544c048 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,8 +53,9 @@ script: # built & installed. - function install_from_tarball { export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; + export CABAL_LIB_VERSION=$(ghc-pkg latest Cabal | gawk 'match($0, /^Cabal-(.*)$/, a) {print a[1]}') ; if [ -f "dist/$SRC_TGZ" ]; then - cabal install "dist/$SRC_TGZ" -v2; + cabal install --cabal-lib-version=$CABAL_LIB_VERSION "dist/$SRC_TGZ" -v2; else echo "expected 'dist/$SRC_TGZ' not found"; exit 1;