From eed527ef860dd1ac8eaf0a4858d2735ddfd746d5 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Sun, 17 Dec 2023 22:49:35 +0530 Subject: [PATCH] Change GHCUP_OPTIONS to GHCUP_GHC_OPTIONS --- README.md | 2 +- packcheck.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f51d6b9..bb1a758 100644 --- a/README.md +++ b/README.md @@ -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_GHC_OPTIONS : Used as in "ghcup install ghc " GHC_OPTIONS : Specify GHC options to use SDIST_OPTIONS : Arguments to stack/cabal sdist command diff --git a/packcheck.sh b/packcheck.sh index 68f2208..d77d04f 100755 --- a/packcheck.sh +++ b/packcheck.sh @@ -198,7 +198,7 @@ SAFE_ENVVARS="\ GHCVER \ CABALVER \ GHC_OPTIONS \ - GHCUP_OPTIONS \ + GHCUP_GHC_OPTIONS \ SDIST_OPTIONS \ DISABLE_SDIST_BUILD \ DISABLE_SDIST_PROJECT_CHECK \ @@ -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 \"" + help_envvar GHCUP_GHC_OPTIONS "Used as in \"ghcup install ghc \"" help_envvar GHC_OPTIONS "Specify GHC options to use" help_envvar SDIST_OPTIONS "Arguments to stack/cabal sdist command" @@ -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() {