aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-09-14 12:29:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-09-14 12:30:37 -0400
commit33cec4c92c1608c9b907aaf2422f87b06039ebbd (patch)
tree85a3eeffe7c6ee202ecf20b65844a52d58875df7
parent2d7fde05f9d8ed68422cc567b2eaea456901b67a (diff)
Fix build with optparse-applicative 0.10. Closes: #761484
This also works with 0.9, and probably 0.8.
-rw-r--r--Test.hs10
-rw-r--r--debian/changelog1
2 files changed, 3 insertions, 8 deletions
diff --git a/Test.hs b/Test.hs
index 9a34835cc..9a716e8ff 100644
--- a/Test.hs
+++ b/Test.hs
@@ -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]
diff --git a/debian/changelog b/debian/changelog
index c2e0ea508..aa7fd6dd6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,7 @@ git-annex (5.20140832) UNRELEASED; urgency=medium
be using a better backend.
* Rather than crashing when there's a problem with the requested bloomfilter
capacity/accuracy, fall back to a reasonable default bloom filter size.
+ * Fix build with optparse-applicative 0.10. Closes: #761484
-- Joey Hess <joeyh@debian.org> Thu, 04 Sep 2014 16:17:22 -0400