on master help sign in
Merge pull request #731 from psibi/warp-host-bug

warp: Use -h option to actually bind to the host

commit4ec6edae4ddc1b54a62bab624fdfa9e8128bf092 authorMichael Snoyman <michael@snoyman.com> dateSun 17 Feb 2019, 08:43 (8 years ago) parent8d1581e5ac87e2
3 files changed+13−2
wai-app-static/ChangeLog.md+6 wai-app-static/WaiAppStatic/CmdLine.hs+6−1 wai-app-static/wai-app-static.cabal+1−1
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+
17## 3.1.6.2
28
39* Drop dependency on blaze-builder
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]
wai-app-static/wai-app-static.cabal+1−1
@@ -1,5 +1,5 @@
11name: wai-app-static
2−version: 3.1.6.2
2+version: 3.1.6.3
33license: MIT
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>