on master help sign in
Merge pull request #731 from psibi/warp-host-bug
4ec6edaMichael Snoyman
wai-app-static/ChangeLog.md+6
@@ -1,3 +1,9 @@
1+## 3.1.6.3
2+
3+* The executable warp obeys `-h` option properly for host
4+now. Previously this used to invoke the help option. That can be
5+reached via `--help` as before.
6+
1## 3.1.6.2
7## 3.1.6.2
2
8
3* Drop dependency on blaze-builder
9* Drop dependency on blaze-builder
wai-app-static/WaiAppStatic/CmdLine.hs+6−1
@@ -93,7 +93,7 @@ args = Args
93-- Since 2.0.1
93-- Since 2.0.1
94runCommandLine :: (Args -> Middleware) -> IO ()
94runCommandLine :: (Args -> Middleware) -> IO ()
95runCommandLine middleware = do
95runCommandLine middleware = do
96− args@Args {..} <- execParser $ info (helper <*> args) fullDesc
96+ args@Args {..} <- execParser $ info (helperOption <*> args) fullDesc
97 let mime' = map (pack *** S8.pack) mime
97 let mime' = map (pack *** S8.pack) mime
98 let mimeMap = Map.fromList mime' `Map.union` defaultMimeMap
98 let mimeMap = Map.fromList mime' `Map.union` defaultMimeMap
99 docroot' <- canonicalizePath docroot
99 docroot' <- canonicalizePath docroot
@@ -110,3 +110,8 @@ runCommandLine middleware = do
110 { ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index
110 { ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index
111 , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fromPiece . fileName
111 , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fromPiece . fileName
112 }
112 }
113+ where
114+ helperOption :: Parser (a -> a)
115+ helperOption =
116+ abortOption ShowHelpText $
117+ mconcat [long "help", help "Show this help text", hidden]
wai-app-static/wai-app-static.cabal+1−1
@@ -1,5 +1,5 @@
1name: wai-app-static
1name: wai-app-static
2−version: 3.1.6.2
2+version: 3.1.6.3
3license: MIT
3license: MIT
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>
5author: Michael Snoyman <michael@snoyman.com>