Skip to content

Commit

Permalink
Set default ghc using ghcup if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Dec 15, 2023
1 parent 3ee3596 commit 4f42109
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,18 @@ ensure_ghc() {
# GHCVER
GHCVER=$($compiler --numeric-version) || exit 1

# cabal info command requires "ghc" to be in PATH
if test -z "$DISABLE_SDIST_BUILD"
then
local ghc
ghc="$(which_cmd ghc)"
if test -z "$ghc" -a -n "$GHCUPVER"
then
echo "No default ghc found in PATH. Setting it using ghcup because SDIST_BUILD needs it"
ghcup set ghc $GHCVER
fi
fi

if test -n "$ENABLE_GHCJS"
then
local tmpdir
Expand Down

0 comments on commit 4f42109

Please sign in to comment.