From d3b61d69b10371676d8ef580a108c722106b8c00 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 10 Feb 2015 11:59:55 -0400 Subject: [PATCH] addurl: Avoid crash if quvi is not installed, when git-annex was built with process-1.2 createProcess has been changed to throw an exception if the program is not in path. --- Utility/Quvi.hs | 4 +++- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Utility/Quvi.hs b/Utility/Quvi.hs index 7f73809c04..33653b07ba 100644 --- a/Utility/Quvi.hs +++ b/Utility/Quvi.hs @@ -22,6 +22,7 @@ data QuviVersion = Quvi04 | Quvi09 | NoQuvi + deriving (Show) data Page = Page { pageTitle :: String @@ -61,7 +62,8 @@ parseEnum s = Page m = M.fromList $ map (separate (== '=')) $ lines s probeVersion :: IO QuviVersion -probeVersion = examine <$> processTranscript "quvi" ["--version"] Nothing +probeVersion = catchDefaultIO NoQuvi $ + examine <$> processTranscript "quviaaa" ["--version"] Nothing where examine (s, True) | "quvi v0.4" `isInfixOf` s = Quvi04 diff --git a/debian/changelog b/debian/changelog index 6809ef1d60..f47ae7f44c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ git-annex (5.20150206) UNRELEASED; urgency=medium inside a repository. * assistant: Improve sanity check for control characters when pairing. * Improve race recovery code when committing to git-annex branch. + * addurl: Avoid crash if quvi is not installed, when git-annex was + built with process-1.2 -- Joey Hess Fri, 06 Feb 2015 13:57:08 -0400