on master help sign in
warp obeys `-h` option properly for host now
commit88d21361dde4d1d5d397d43f38aff442927ce98d authorSibi Prabakaran <sibi@psibi.in> dateSat 16 Feb 2019, 02:23 (8 years ago) parent8d1581e
1 file changed+6−1
wai-app-static/WaiAppStatic/CmdLine.hs+6−1
wai-app-static/WaiAppStatic/CmdLine.hs+6−1
@@ -93,7 +93,7 @@ args = Args
9393-- Since 2.0.1
9494runCommandLine :: (Args -> Middleware) -> IO ()
9595runCommandLine middleware = do
96− args@Args {..} <- execParser $ info (helper <*> args) fullDesc
96+ args@Args {..} <- execParser $ info (helperOption <*> args) fullDesc
9797 let mime' = map (pack *** S8.pack) mime
9898 let mimeMap = Map.fromList mime' `Map.union` defaultMimeMap
9999 docroot' <- canonicalizePath docroot
@@ -110,3 +110,8 @@ runCommandLine middleware = do
110110 { ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index
111111 , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fromPiece . fileName
112112 }
113+ where
114+ helperOption :: Parser (a -> a)
115+ helperOption =
116+ abortOption ShowHelpText $
117+ mconcat [long "help", help "Show this help text", hidden]