aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-annex.hs22
1 files changed, 11 insertions, 11 deletions
diff --git a/git-annex.hs b/git-annex.hs
index 198a1f4e6..aeb2b0867 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"