mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 18:43:46 +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
|
, oTrace :: Bool
|
||||||
, oCollectFx :: Bool
|
, oCollectFx :: Bool
|
||||||
, oLocalhost :: Bool
|
, oLocalhost :: Bool
|
||||||
|
, oOffline :: Bool
|
||||||
}
|
}
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
@ -243,6 +244,11 @@ opts = do
|
|||||||
<> help "Write effects to disk for debugging"
|
<> help "Write effects to disk for debugging"
|
||||||
<> hidden
|
<> hidden
|
||||||
|
|
||||||
|
oOffline <- switch $ short 'O'
|
||||||
|
<> long "offline"
|
||||||
|
<> help "Run without any networking"
|
||||||
|
<> hidden
|
||||||
|
|
||||||
pure (Opts{..})
|
pure (Opts{..})
|
||||||
|
|
||||||
newShip :: Parser Cmd
|
newShip :: Parser Cmd
|
||||||
|
@ -128,6 +128,7 @@ toPierConfig pierPath CLI.Opts{..} = PierConfig
|
|||||||
{ pcPierPath = pierPath
|
{ pcPierPath = pierPath
|
||||||
, pcDryRun = oDryRun
|
, pcDryRun = oDryRun
|
||||||
, pcNetworking = if oDryRun then NetworkNone
|
, pcNetworking = if oDryRun then NetworkNone
|
||||||
|
else if oOffline then NetworkNone
|
||||||
else if oLocalhost then NetworkLocalhost
|
else if oLocalhost then NetworkLocalhost
|
||||||
else NetworkNormal
|
else NetworkNormal
|
||||||
, pcAmesPort = oAmesPort
|
, pcAmesPort = oAmesPort
|
||||||
|
Loading…
Reference in New Issue
Block a user