diff options
author | Joey Hess <joey@kitenet.net> | 2014-09-14 12:29:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-09-14 12:30:37 -0400 |
commit | 33cec4c92c1608c9b907aaf2422f87b06039ebbd (patch) | |
tree | 85a3eeffe7c6ee202ecf20b65844a52d58875df7 /Test.hs | |
parent | 2d7fde05f9d8ed68422cc567b2eaea456901b67a (diff) |
Fix build with optparse-applicative 0.10. Closes: #761484
This also works with 0.9, and probably 0.8.
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -17,9 +17,6 @@ import Test.Tasty.Ingredients.Rerun import Data.Monoid import Options.Applicative hiding (command) -#if MIN_VERSION_optparse_applicative(0,8,0) -import qualified Options.Applicative.Types as Opt -#endif import qualified Data.Map as M import qualified Text.JSON @@ -115,16 +112,13 @@ main ps = do exitFailure ) where - progdesc = "git-annex test" parseOpts pprefs pinfo args = #if MIN_VERSION_optparse_applicative(0,8,0) - pure $ case execParserPure pprefs pinfo args of - Opt.Success v -> v - Opt.Failure f -> error $ fst $ Opt.execFailure f progdesc - Opt.CompletionInvoked _ -> error "completion not supported" + handleParseResult $ execParserPure pprefs pinfo args #else either (error <=< flip errMessage progdesc) return $ execParserPure pprefs pinfo args + progdesc = "git-annex test" #endif ingredients :: [Ingredient] |