bugfix
Annex.new can throw an IO exception if a remote git repo is not available.
This commit is contained in:
parent
3cf16c9883
commit
fed1d3c1f5
1 changed files with 3 additions and 3 deletions
|
@ -76,10 +76,10 @@ keyPossibilities key = do
|
||||||
inAnnex :: Git.Repo -> Key -> Annex (Either IOException Bool)
|
inAnnex :: Git.Repo -> Key -> Annex (Either IOException Bool)
|
||||||
inAnnex remote key = do
|
inAnnex remote key = do
|
||||||
-- the check needs to run in an Annex monad using the remote
|
-- the check needs to run in an Annex monad using the remote
|
||||||
a <- liftIO $ Annex.new remote []
|
liftIO $ ((try $ check)::IO (Either IOException Bool))
|
||||||
liftIO $ ((try $ check a)::IO (Either IOException Bool))
|
|
||||||
where
|
where
|
||||||
check a = do
|
check = do
|
||||||
|
a <- Annex.new remote []
|
||||||
(result, _) <- Annex.run a (Core.inAnnex key)
|
(result, _) <- Annex.run a (Core.inAnnex key)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue