From 21d9c84e7292a8984ea5d46c0134ddc6ff19babc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 May 2011 11:44:13 -0400 Subject: more standard names for whenM and unlessM operators These are defined in ifelse, but it's not currently available and I don't want to pull in a library for 6 lines of code anyhow. Also, ifelse sets the fixity to 1, which does not allow >>? error $ ... --- GitRepo.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'GitRepo.hs') diff --git a/GitRepo.hs b/GitRepo.hs index d070bc89e..f489dfe35 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -331,7 +331,7 @@ gitCommandLine repo _ = assertLocal repo $ error "internal" run :: Repo -> String -> [CommandParam] -> IO () run repo subcommand params = assertLocal repo $ boolSystem "git" (gitCommandLine repo ((Param subcommand):params)) - <|> error $ "git " ++ show params ++ " failed" + >>! error $ "git " ++ show params ++ " failed" {- Runs a git subcommand and returns it output, lazily. - -- cgit v1.2.3