From b38865e056e5d6579fc8e973055387ae2b25f3a3 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 2 Jan 2023 17:58:35 +0800 Subject: [PATCH] Make sure GHCUP_INSTALL_BASE_PREFIX is set (#6770) We use it during installation and add it to PATH, but then don't instruct ghcup to actually use this directory at runtime. This leads to: 1. ghcup is in /usr/local/.ghcup/bin/ 2. `ghcup install cabal latest` will actually install into ~/.ghcup/bin/ 3. since ~/.ghcup/bin/ is not in PATH, but /usr/local/.ghcup/bin/ is, the new binary is not visible to the user This issues does not exist on darwin, because there we use ~/.ghcup/bin/. https://downloads.haskell.org/ghcup/tmp/aarch64-linux-ghcup-0.1.18.1 --- images/linux/scripts/installers/haskell.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 8d11b5df..36d49384 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -14,6 +14,7 @@ export GHCUP_INSTALL_BASE_PREFIX=/usr/local export BOOTSTRAP_HASKELL_GHC_VERSION=0 ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin setEtcEnvironmentVariable "BOOTSTRAP_HASKELL_NONINTERACTIVE" $BOOTSTRAP_HASKELL_NONINTERACTIVE +setEtcEnvironmentVariable "GHCUP_INSTALL_BASE_PREFIX" $GHCUP_INSTALL_BASE_PREFIX # Install GHCup curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh > /dev/null 2>&1 || true