Skip to content

Commit

Permalink
fixup: check ghc version only when GHCVER is set
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Dec 15, 2023
1 parent 4f42109 commit 537bf93
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ check_version() {

# Match that the expected version is a prefix of real
# Do not check when the expected version is head
if test "${real_ver#$2}" != ${real_ver} -o $2 = head
if test "${real_ver#$2}" != "${real_ver}" -o "$2" = head
then
return 0
else
Expand Down Expand Up @@ -957,7 +957,11 @@ ensure_ghc() {
die "$msg"
fi

check_version_die $COMPILER $GHCVER
if test -n "$GHCVER"
then
check_version_die $COMPILER $GHCVER
fi

if test -n "$GHCVER" -a -n "$(need_stack)"
then
echo "GHCVER is specified, using '$STACKCMD --system-ghc'."
Expand Down

0 comments on commit 537bf93

Please sign in to comment.