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.
This commit is contained in:
parent
5bc764e091
commit
d3b61d69b1
2 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,7 @@ data QuviVersion
|
||||||
= Quvi04
|
= Quvi04
|
||||||
| Quvi09
|
| Quvi09
|
||||||
| NoQuvi
|
| NoQuvi
|
||||||
|
deriving (Show)
|
||||||
|
|
||||||
data Page = Page
|
data Page = Page
|
||||||
{ pageTitle :: String
|
{ pageTitle :: String
|
||||||
|
@ -61,7 +62,8 @@ parseEnum s = Page
|
||||||
m = M.fromList $ map (separate (== '=')) $ lines s
|
m = M.fromList $ map (separate (== '=')) $ lines s
|
||||||
|
|
||||||
probeVersion :: IO QuviVersion
|
probeVersion :: IO QuviVersion
|
||||||
probeVersion = examine <$> processTranscript "quvi" ["--version"] Nothing
|
probeVersion = catchDefaultIO NoQuvi $
|
||||||
|
examine <$> processTranscript "quviaaa" ["--version"] Nothing
|
||||||
where
|
where
|
||||||
examine (s, True)
|
examine (s, True)
|
||||||
| "quvi v0.4" `isInfixOf` s = Quvi04
|
| "quvi v0.4" `isInfixOf` s = Quvi04
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -18,6 +18,8 @@ git-annex (5.20150206) UNRELEASED; urgency=medium
|
||||||
inside a repository.
|
inside a repository.
|
||||||
* assistant: Improve sanity check for control characters when pairing.
|
* assistant: Improve sanity check for control characters when pairing.
|
||||||
* Improve race recovery code when committing to git-annex branch.
|
* 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 <id@joeyh.name> Fri, 06 Feb 2015 13:57:08 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 06 Feb 2015 13:57:08 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue