From 8fdbd1190d7f20c77ee401b9da5affd5730564e3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 14 Feb 2014 13:39:22 -0400 Subject: [PATCH] avoid git-annex-shell test --- git-annex.hs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/git-annex.hs b/git-annex.hs index 198a1f4e6e..aeb2b08674 100644 --- a/git-annex.hs +++ b/git-annex.hs @@ -17,18 +17,18 @@ import qualified Test #endif main :: IO () -main = run =<< getProgName +main = do + ps <- getArgs + run ps =<< getProgName where - run n - | isshell n = go CmdLine.GitAnnexShell.run - | otherwise = go CmdLine.GitAnnex.run - isshell n = takeFileName n == "git-annex-shell" - go a = do - ps <- getArgs + run ps n + | isshell n = CmdLine.GitAnnexShell.run ps + | otherwise = #ifdef WITH_TESTSUITE - case ps of - ("test":ps') -> Test.main ps' - _ -> a ps + case ps of + ("test":ps') -> Test.main ps' + _ -> CmdLine.GitAnnex.run ps #else - a ps + CmdLine.GitAnnex.run ps #endif + isshell n = takeFileName n == "git-annex-shell"