Commit c7cf7a78 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #1491 from rwbarton/rwbarton-get-s

"cabal get --source-repository" fails under ghc 7.7 when a brancher is missing
parents 8b838b65 729cd551
......@@ -39,7 +39,7 @@ import Distribution.Client.IndexUtils as IndexUtils
( getSourcePackages )
import Control.Exception
( finally )
( catch, finally )
import Control.Monad
( filterM, forM_, unless, when )
import Data.List
......@@ -204,7 +204,7 @@ allBranchers =
-- exits successfully, that brancher is considered usable.
findUsableBranchers :: IO (Data.Map.Map PD.RepoType Brancher)
findUsableBranchers = do
let usable (_, brancher) = do
let usable (_, brancher) = flip catch (const (return False) :: IOError -> IO Bool) $ do
let cmd = brancherBinary brancher
(exitCode, _, _) <- readProcessWithExitCode cmd ["--help"] ""
return (exitCode == ExitSuccess)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment