Skip to content
Snippets Groups Projects

Allow to disable self-upgrade functionality wrt #305

Merged Julian Ospald requested to merge issue-305 into master
3 files
+ 35
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -15,7 +15,9 @@ module GHCup.OptParse (
@@ -15,7 +15,9 @@ module GHCup.OptParse (
, module GHCup.OptParse.Config
, module GHCup.OptParse.Config
, module GHCup.OptParse.Whereis
, module GHCup.OptParse.Whereis
, module GHCup.OptParse.List
, module GHCup.OptParse.List
 
#ifndef DISABLE_UPGRADE
, module GHCup.OptParse.Upgrade
, module GHCup.OptParse.Upgrade
 
#endif
, module GHCup.OptParse.ChangeLog
, module GHCup.OptParse.ChangeLog
, module GHCup.OptParse.Prefetch
, module GHCup.OptParse.Prefetch
, module GHCup.OptParse.GC
, module GHCup.OptParse.GC
@@ -35,7 +37,9 @@ import GHCup.OptParse.Compile
@@ -35,7 +37,9 @@ import GHCup.OptParse.Compile
import GHCup.OptParse.Config
import GHCup.OptParse.Config
import GHCup.OptParse.Whereis
import GHCup.OptParse.Whereis
import GHCup.OptParse.List
import GHCup.OptParse.List
 
#ifndef DISABLE_UPGRADE
import GHCup.OptParse.Upgrade
import GHCup.OptParse.Upgrade
 
#endif
import GHCup.OptParse.ChangeLog
import GHCup.OptParse.ChangeLog
import GHCup.OptParse.Prefetch
import GHCup.OptParse.Prefetch
import GHCup.OptParse.GC
import GHCup.OptParse.GC
@@ -89,7 +93,9 @@ data Command
@@ -89,7 +93,9 @@ data Command
| Compile CompileCommand
| Compile CompileCommand
| Config ConfigCommand
| Config ConfigCommand
| Whereis WhereisOptions WhereisCommand
| Whereis WhereisOptions WhereisCommand
 
#ifndef DISABLE_UPGRADE
| Upgrade UpgradeOpts Bool
| Upgrade UpgradeOpts Bool
 
#endif
| ToolRequirements
| ToolRequirements
| ChangeLog ChangeLogOptions
| ChangeLog ChangeLogOptions
| Nuke
| Nuke
@@ -208,6 +214,7 @@ com =
@@ -208,6 +214,7 @@ com =
(info (List <$> listOpts <**> helper)
(info (List <$> listOpts <**> helper)
(progDesc "Show available GHCs and other tools")
(progDesc "Show available GHCs and other tools")
)
)
 
#ifndef DISABLE_UPGRADE
<> command
<> command
"upgrade"
"upgrade"
(info
(info
@@ -218,6 +225,7 @@ com =
@@ -218,6 +225,7 @@ com =
)
)
(progDesc "Upgrade ghcup")
(progDesc "Upgrade ghcup")
)
)
 
#endif
<> command
<> command
"compile"
"compile"
( Compile
( Compile
Loading