From 1e628422a36a02c45d78a6933a5e0c7e654b004d Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 10 Oct 2022 13:18:09 +0800 Subject: [PATCH] Don't install stack install hook See https://github.com/commercialhaskell/stack/issues/5895 Stack feature is documented here: https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation It's recommended, but probably too unexpected for CI. It means stack will not install GHC on its own, but through GHCup. --- images/linux/scripts/installers/haskell.sh | 1 + images/linux/scripts/tests/Haskell.Tests.ps1 | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 702841e6..8d11b5df 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -9,6 +9,7 @@ source $HELPER_SCRIPTS/etc-environment.sh # Any nonzero value for noninteractive installation export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 +export BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1 export GHCUP_INSTALL_BASE_PREFIX=/usr/local export BOOTSTRAP_HASKELL_GHC_VERSION=0 ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin diff --git a/images/linux/scripts/tests/Haskell.Tests.ps1 b/images/linux/scripts/tests/Haskell.Tests.ps1 index 21706bd8..af05f983 100644 --- a/images/linux/scripts/tests/Haskell.Tests.ps1 +++ b/images/linux/scripts/tests/Haskell.Tests.ps1 @@ -31,4 +31,8 @@ Describe "Haskell" { It "Stack" { "stack --version" | Should -ReturnZeroExitCode } + + It "Stack hook is not installed" { + "$HOME/.stack/hooks/ghc-install.sh" | Should -Not -Exist + } }