mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 23:23:52 +03:00
Revive and hook up the option.
This commit is contained in:
parent
9ec9426b8a
commit
73dae3e805
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user