aboutsummaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 6b4fd0f36..de03d96ed 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -45,7 +45,9 @@ parseCmd argv header cmds options = do
[] -> error $ "unknown command" ++ usagemsg
[command] -> do
_ <- sequence flags
- prepCmd command (drop 1 params)
+ when (cmdusesrepo command) $
+ checkVersion
+ prepCommand command (drop 1 params)
_ -> error "internal error: multiple matching commands"
where
getopt = case getOpt Permute options argv of
@@ -93,7 +95,6 @@ tryRun' _ errnum [] = do
startup :: Annex Bool
startup = do
prepUUID
- checkVersion
return True
{- Cleanup actions. -}