From bf0e5b37ca6149b8f1794afe8f8d0734dc6000e9 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 6 Jun 2022 20:22:45 +0200 Subject: [PATCH] Test issue #375 --- .gitlab/script/ghcup_version.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab/script/ghcup_version.sh b/.gitlab/script/ghcup_version.sh index 6cabc69..5dfc8a9 100755 --- a/.gitlab/script/ghcup_version.sh +++ b/.gitlab/script/ghcup_version.sh @@ -97,6 +97,7 @@ rm -rf "${GHCUP_DIR}" eghcup --numeric-version eghcup install ghc ${GHC_VERSION} +eghcup unset ghc ${GHC_VERSION} ls -lah "$(eghcup whereis -d ghc ${GHC_VERSION})" [ "`$(eghcup whereis ghc ${GHC_VERSION}) --numeric-version`" = "${GHC_VERSION}" ] [ "`eghcup run --ghc ${GHC_VERSION} -- ghc --numeric-version`" = "${GHC_VERSION}" ] @@ -105,9 +106,13 @@ eghcup install cabal ${CABAL_VERSION} [ "`$(eghcup whereis cabal ${CABAL_VERSION}) --numeric-version`" = "${CABAL_VERSION}" ] eghcup unset cabal "$GHCUP_BIN"/cabal --version && exit 1 || echo yes -eghcup set cabal ${CABAL_VERSION} -[ "`$(eghcup whereis cabal ${CABAL_VERSION}) --numeric-version`" = "${CABAL_VERSION}" ] + +# make sure no cabal is set when running 'ghcup run' to check that PATH propagages properly +# https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/375 [ "`eghcup run --cabal ${CABAL_VERSION} -- cabal --numeric-version`" = "${CABAL_VERSION}" ] +eghcup set cabal ${CABAL_VERSION} + +[ "`$(eghcup whereis cabal ${CABAL_VERSION}) --numeric-version`" = "${CABAL_VERSION}" ] if [ "${OS}" != "FREEBSD" ] ; then if [ "${ARCH}" = "64" ] ; then