From af04b4e5969810d7ddc31f29aa3bf03b7cfbc47b Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Mon, 25 Jan 2016 13:42:17 +0100 Subject: [PATCH] .travis.yml/install_from_tarball: Use '--cabal-lib-version'. See https://github.com/haskell/cabal/issues/3003#issuecomment-174492371 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;