diff options
author | Joey Hess <joey@kitenet.net> | 2014-09-17 13:36:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-09-17 13:46:01 -0400 |
commit | d6fbc08d67de808e98e61c80066823803f24cc80 (patch) | |
tree | 1f6f214b521c7838006f87f0ecc0b580e4eab302 /Test.hs | |
parent | 816c0dd77b5818f6003fd2754c9a84e5bf434dcd (diff) |
fix display of git-annex test command name in usage
This needs optparse-applicative 0.10. Dropped support for 0.9 and older,
but kept 0.9.1 working since autobuilders and debian testing still use it.
(The display is not perfect with 0.9.1.)
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -113,13 +113,16 @@ main ps = do ) where parseOpts pprefs pinfo args = -#if MIN_VERSION_optparse_applicative(0,8,0) - handleParseResult $ execParserPure pprefs pinfo args +#if MIN_VERSION_optparse_applicative(0,10,0) + case execParserPure pprefs pinfo args of + (Options.Applicative.Failure failure) -> do + let (msg, _exit) = renderFailure failure progdesc + error msg + v -> handleParseResult v #else - either (error <=< flip errMessage progdesc) return $ - execParserPure pprefs pinfo args - progdesc = "git-annex test" + handleParseResult $ execParserPure pprefs pinfo args #endif + progdesc = "git-annex test" ingredients :: [Ingredient] ingredients = |