From a72a12b96d05595bac968b3002c1648f73080281 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 11 May 2022 22:06:30 +0200 Subject: [PATCH] Test that --isolate --force bevaves well --- .gitlab/script/ghcup_version.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab/script/ghcup_version.sh b/.gitlab/script/ghcup_version.sh index 5ea008f..a8b722f 100755 --- a/.gitlab/script/ghcup_version.sh +++ b/.gitlab/script/ghcup_version.sh @@ -264,6 +264,19 @@ if [ "${ARCH}" = "64" ] ; then eghcup install hls -i "$(pwd)/isolated" 1.3.0 [ "$(isolated/haskell-language-server-wrapper --numeric-version)" = "1.3.0" ] || [ "$(isolated/haskell-language-server-wrapper --numeric-version)" = "1.3.0.0" ] + + # test that isolated installs don't clean up target directory + cat < "${GHCUP_BIN}/gmake" +#!/bin/bash +exit 1 +EOF + chmod +x "${GHCUP_BIN}/gmake" + mkdir isolated_tainted/ + touch isolated_tainted/lol + + ! eghcup install ghc -i "$(pwd)/isolated_tainted" 8.10.5 --force + [ -e "$(pwd)/isolated_tainted/lol" ] + rm "${GHCUP_BIN}/gmake" fi fi