aboutsummaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-14 13:39:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-14 13:39:22 -0400
commit2fa414765cfeef4fbea11a12b2333684afe4873c (patch)
tree64866f9cb1ba72e5ae1714635591ff6bb2442e7c /git-annex.hs
parent63bb3945e6d011f363d104b60d3cde230afcbe4e (diff)
avoid git-annex-shell test
Diffstat (limited to 'git-annex.hs')
-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"