Skip to content

Commit

Permalink
Change GHCUP_OPTIONS to GHCUP_GHC_OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Dec 17, 2023
1 parent 8bf0ca1 commit eed527e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ PATH : [path] Set PATH explicitly for predictable builds
--------------------------------------------------
Specifying common tool options
--------------------------------------------------
GHCUP_OPTIONS : Used as in "ghcup install ghc <GHCUP_OPTIONS> <version>"
GHCUP_GHC_OPTIONS : Used as in "ghcup install ghc <GHCUP_GHC_OPTIONS> <version>"
GHC_OPTIONS : Specify GHC options to use
SDIST_OPTIONS : Arguments to stack/cabal sdist command
Expand Down
11 changes: 8 additions & 3 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ SAFE_ENVVARS="\
GHCVER \
CABALVER \
GHC_OPTIONS \
GHCUP_OPTIONS \
GHCUP_GHC_OPTIONS \
SDIST_OPTIONS \
DISABLE_SDIST_BUILD \
DISABLE_SDIST_PROJECT_CHECK \
Expand Down Expand Up @@ -373,7 +373,7 @@ show_help() {
# TODO
# help_envvar TOOL_OPTIONS "Specify the tool specific (stack or cabal) options to use."
# help_envvar BUILD_OPTIONS "Specify the tool specific build (stack build or cabal new-build) options to use."
help_envvar GHCUP_OPTIONS "Used as in \"ghcup install ghc <GHCUP_OPTIONS> <version>\""
help_envvar GHCUP_GHC_OPTIONS "Used as in \"ghcup install ghc <GHCUP_GHC_OPTIONS> <version>\""
help_envvar GHC_OPTIONS "Specify GHC options to use"
help_envvar SDIST_OPTIONS "Arguments to stack/cabal sdist command"

Expand Down Expand Up @@ -937,7 +937,12 @@ ghcup_install() {
#$GHCUP_PATH set $tool $tool_ver
fi

run_verbose_errexit ghcup install $tool $GHCUP_OPTIONS $tool_ver
if test "$tool" = "ghc"
then
run_verbose_errexit ghcup install ghc $GHCUP_GHC_OPTIONS $tool_ver
else
run_verbose_errexit ghcup install $tool $tool_ver
fi
}

ensure_ghc() {
Expand Down

0 comments on commit eed527e

Please sign in to comment.