Fix non-interactive install on windows

This commit is contained in:
Julian Ospald 2022-07-12 20:26:57 +02:00
parent 00fa70b9de
commit ea828cd13a
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 7 additions and 3 deletions

View File

@ -140,8 +140,12 @@ ecabal() {
} }
_ecabal() { _ecabal() {
# shellcheck disable=SC2086 if [ -n "${CABAL_BIN}" ] ; then
"${GHCUP_BIN}/cabal" "$@" "${CABAL_BIN}" "$@"
else
# shellcheck disable=SC2086
"${GHCUP_BIN}/cabal" "$@"
fi
} }
_done() { _done() {
@ -817,7 +821,7 @@ else # don't install ghc and cabal
# we'll remove it afterwards # we'll remove it afterwards
tmp_dir="$(mktemp -d)" tmp_dir="$(mktemp -d)"
eghcup --cache install cabal -i "${tmp_dir}" "${BOOTSTRAP_HASKELL_CABAL_VERSION}" eghcup --cache install cabal -i "${tmp_dir}" "${BOOTSTRAP_HASKELL_CABAL_VERSION}"
PATH="${tmp_dir}:$PATH" do_cabal_config_init $ask_cabal_config_init_answer CABAL_BIN="${tmp_dir}/cabal" do_cabal_config_init $ask_cabal_config_init_answer
rm "${tmp_dir}/cabal" rm "${tmp_dir}/cabal"
unset tmp_dir unset tmp_dir
;; ;;