Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/1104'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jul 16, 2024
2 parents 08c9c79 + d221e25 commit d8410ed
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/bootstrap/bootstrap-haskell
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# * BOOTSTRAP_HASKELL_CABAL_XDG - don't disable the XDG logic (this doesn't force XDG though, because cabal is confusing)
# * BOOTSTRAP_HASKELL_INSTALL_NO_STACK - disable installation of stack
# * BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK - disable installation stack ghcup hook
# * BOOTSTRAP_HASKELL_INSTALL_HLS - whether to install latest hls
# * BOOTSTRAP_HASKELL_STACK_VERSION - the stack version to install
# * BOOTSTRAP_HASKELL_INSTALL_HLS - whether to install hls
# * BOOTSTRAP_HASKELL_HLS_VERSION - the hls version to install
# * BOOTSTRAP_HASKELL_ADJUST_BASHRC - whether to adjust PATH in bashrc (prepend)
# * BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG - whether to adjust mingw paths in cabal.config on windows
# * BOOTSTRAP_HASKELL_DOWNLOADER - which downloader to use (default: curl)
Expand Down Expand Up @@ -100,8 +102,8 @@ esac

: "${BOOTSTRAP_HASKELL_GHC_VERSION:=recommended}"
: "${BOOTSTRAP_HASKELL_CABAL_VERSION:=recommended}"


: "${BOOTSTRAP_HASKELL_STACK_VERSION:=recommended}"
: "${BOOTSTRAP_HASKELL_HLS_VERSION:=recommended}"

warn() {
if [ -n "${NO_COLOR}" ] ; then
Expand Down Expand Up @@ -897,17 +899,20 @@ fi

case $ask_hls_answer in
1)
(_eghcup --cache install hls) || warn "HLS installation failed, continuing anyway"
(_eghcup --cache install hls "${BOOTSTRAP_HASKELL_HLS_VERSION}") ||
warn "HLS installation failed, continuing anyway"
;;
*) ;;
esac

case $ask_stack_answer in
1)
(_eghcup --cache install stack) || die "Stack installation failed"
(_eghcup --cache install stack "${BOOTSTRAP_HASKELL_STACK_VERSION}") ||
die "Stack installation failed"
;;
2)
(_eghcup --cache install stack) || die "Stack installation failed"
(_eghcup --cache install stack "${BOOTSTRAP_HASKELL_STACK_VERSION}") ||
die "Stack installation failed"
stack_root="$(find_stack_root)"
edo mkdir -p "${stack_root}"/hooks
hook_exe="${stack_root}"/hooks/ghc-install.sh
Expand Down

0 comments on commit d8410ed

Please sign in to comment.