diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-23 22:25:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-23 22:25:07 -0400 |
commit | fed1d3c1f534e01414292cd99724e15f5b19cda7 (patch) | |
tree | c2dfc4c8dbecdecc68208a992dd613009645b77c /Remotes.hs | |
parent | 3cf16c9883d63247cceb1f8cf2ce41d43b7a214e (diff) |
bugfix
Annex.new can throw an IO exception if a remote git repo is not available.
Diffstat (limited to 'Remotes.hs')
-rw-r--r-- | Remotes.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Remotes.hs b/Remotes.hs index 4cfcfdffd..aec38a363 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -76,10 +76,10 @@ keyPossibilities key = do inAnnex :: Git.Repo -> Key -> Annex (Either IOException Bool) inAnnex remote key = do -- the check needs to run in an Annex monad using the remote - a <- liftIO $ Annex.new remote [] - liftIO $ ((try $ check a)::IO (Either IOException Bool)) + liftIO $ ((try $ check)::IO (Either IOException Bool)) where - check a = do + check = do + a <- Annex.new remote [] (result, _) <- Annex.run a (Core.inAnnex key) return result |