[Travis] Fail early on stack solver fails

This commit is contained in:
Nikolay Yakimov 2016-08-09 13:02:59 +03:00
parent 5e83a8b2fc
commit bb754b896f

View File

@ -30,7 +30,7 @@ install:
resf="ghc-$GHCVER.yaml"
echo "resolver: ghc-$GHCVER" > "$resf"
echo "packages: ['.']" >> "$resf"
stack --no-terminal solver --update-config --stack-yaml="$resf"
stack --no-terminal solver --update-config --stack-yaml="$resf" || exit 101
sed -i 's/^resolver:/compiler:/;s/^extra-deps:/packages:/' "$resf"
echo "resolver: { name: 'ghc-$GHCVER', location: './$resf' }" > stack.yaml
echo "packages: ['.']" >> stack.yaml