king: Slight CLI cleanup and fix test build.

Forgot to add `hidden` to http options. Without this, they show up on
the summary line in `king run --help`.
This commit is contained in:
Benjamin Summers 2020-03-02 15:53:02 -08:00
parent 2dc97293cc
commit 237774adc5
2 changed files with 15 additions and 8 deletions

View File

@ -212,31 +212,38 @@ new = do
opts :: Parser Opts
opts = do
oAmesPort <- optional $ option auto $ metavar "PORT"
<> short 'p'
<> long "ames"
<> help "Ames port"
oAmesPort <-
optional
$ option auto
$ metavar "PORT"
<> short 'p'
<> long "ames"
<> help "Ames port"
<> hidden
oHttpPort <-
optional
$ option auto
$ metavar "PORT"
<> long "http-port"
<> help "HTTP Server port"
<> help "HTTP port"
<> hidden
oHttpsPort <-
optional
$ option auto
$ metavar "PORT"
<> long "https-port"
<> help "HTTPS server port"
<> help "HTTPS port"
<> hidden
oLoopbackPort <-
optional
$ option auto
$ metavar "PORT"
<> long "loopback-port"
<> help "Localhost-only HTTP server port"
<> help "Localhost-only HTTP port"
<> hidden
-- Always disable hashboard. Right now, urbit is almost unusable with this
-- flag enabled and it is disabled in vere.

View File

@ -51,7 +51,7 @@ instance HasNetworkConfig NetworkTestApp where
runNetworkApp :: RIO NetworkTestApp a -> IO a
runNetworkApp = runRIO NetworkTestApp
{ _ntaLogFunc = mkLogFunc l
, _ntaNetworkConfig = NetworkConfig NetworkNormal Nothing
, _ntaNetworkConfig = NetworkConfig NMNormal Nothing Nothing Nothing Nothing
}
where
l _ _ _ _ = pure ()