Allow to disable self-upgrade functionality wrt #305

This commit is contained in:
2022-01-28 23:08:35 +01:00
parent 2ed047515e
commit b245c11b1d
3 changed files with 35 additions and 2 deletions

View File

@@ -48,6 +48,13 @@ flag no-exe
default: False
manual: True
flag disable-upgrade
description:
Build the brick powered tui (ghcup tui). This is disabled on windows.
default: False
manual: True
library
exposed-modules:
GHCup
@@ -195,7 +202,6 @@ executable ghcup
GHCup.OptParse.Set
GHCup.OptParse.ToolRequirements
GHCup.OptParse.UnSet
GHCup.OptParse.Upgrade
GHCup.OptParse.Whereis
hs-source-dirs: app/ghcup
@@ -262,6 +268,12 @@ executable ghcup
if flag(no-exe)
buildable: False
if (flag(disable-upgrade))
cpp-options: -DDISABLE_UPGRADE
else
other-modules:
GHCup.OptParse.Upgrade
test-suite ghcup-test
type: exitcode-stdio-1.0
main-is: Main.hs