Revive and hook up the option.

This commit is contained in:
Elliot Glaysher 2019-10-17 17:02:33 -07:00
parent 9ec9426b8a
commit 73dae3e805
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@ data Opts = Opts
, oTrace :: Bool
, oCollectFx :: Bool
, oLocalhost :: Bool
, oOffline :: Bool
}
deriving (Show)
@ -243,6 +244,11 @@ opts = do
<> help "Write effects to disk for debugging"
<> hidden
oOffline <- switch $ short 'O'
<> long "offline"
<> help "Run without any networking"
<> hidden
pure (Opts{..})
newShip :: Parser Cmd

View File

@ -128,6 +128,7 @@ toPierConfig pierPath CLI.Opts{..} = PierConfig
{ pcPierPath = pierPath
, pcDryRun = oDryRun
, pcNetworking = if oDryRun then NetworkNone
else if oOffline then NetworkNone
else if oLocalhost then NetworkLocalhost
else NetworkNormal
, pcAmesPort = oAmesPort