Skip to content

Commit

Permalink
Disable cabal XDG by default
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jan 16, 2024
1 parent 55030d8 commit 2850f34
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/bootstrap/bootstrap-haskell
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# * BOOTSTRAP_HASKELL_VERBOSE - any nonzero value for more verbose installation
# * BOOTSTRAP_HASKELL_GHC_VERSION - the ghc version to install
# * BOOTSTRAP_HASKELL_CABAL_VERSION - the cabal version to install
# * 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
Expand Down Expand Up @@ -820,6 +821,15 @@ if [ -z "${BOOTSTRAP_HASKELL_MINIMAL}" ] ; then

do_cabal_config_init $ask_cabal_config_init_answer

if [ -z "${BOOTSTRAP_HASKELL_CABAL_XDG}" ] ; then
# disable XDG if we can
if [ -e "${XDG_CONFIG_HOME:-"$HOME/.config"}/cabal" ] || [ -n "${CABAL_DIR}" ] || [ -n "${CABAL_CONFIG}" ] ; then
:
else
edo mkdir -p "${HOME}/.cabal"
fi
fi

edo cabal update --ignore-project
else # don't install ghc and cabal
case "${plat}" in
Expand Down

0 comments on commit 2850f34

Please sign in to comment.