From aae3f31c50d2c27a5339b9bec106cbb0c6fb1578 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 6 Jun 2022 22:51:04 +0200 Subject: [PATCH] Fix bootstrap-haskell picking system cabal --- scripts/bootstrap/bootstrap-haskell | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap/bootstrap-haskell b/scripts/bootstrap/bootstrap-haskell index 69f1528..6d8e2b5 100755 --- a/scripts/bootstrap/bootstrap-haskell +++ b/scripts/bootstrap/bootstrap-haskell @@ -133,6 +133,15 @@ _eghcup() { fi } +ecabal() { + edo _ecabal "$@" +} + +_ecabal() { + # shellcheck disable=SC2086 + "${GHCUP_BIN}/cabal" "$@" +} + _done() { echo echo "===============================================================================" @@ -537,7 +546,7 @@ adjust_cabal_config() { else cabal_bin="$HOME/AppData/Roaming/cabal/bin" fi - edo cabal user-config -a "extra-prog-path: $(cygpath -w "$GHCUP_BIN"), $(cygpath -w "$cabal_bin"), $(cygpath -w "$GHCUP_MSYS2"/usr/bin), $(cygpath -w "$GHCUP_MSYS2"/mingw64/bin)" -a "extra-include-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/include)" -a "extra-lib-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/lib)" -f init + ecabal user-config -a "extra-prog-path: $(cygpath -w "$GHCUP_BIN"), $(cygpath -w "$cabal_bin"), $(cygpath -w "$GHCUP_MSYS2"/usr/bin), $(cygpath -w "$GHCUP_MSYS2"/mingw64/bin)" -a "extra-include-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/include)" -a "extra-lib-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/lib)" -f init } ask_cabal_config_init() { @@ -763,7 +772,7 @@ if [ -z "${BOOTSTRAP_HASKELL_MINIMAL}" ] ; then do_cabal_config_init $ask_cabal_config_init_answer - edo cabal update --ignore-project + ecabal update --ignore-project else # don't install ghc and cabal case "${plat}" in MSYS*|MINGW*)