avoid version check before running version and upgrade commands
There are two types of commands; those that access the repository and those that don't. Sorted.
This commit is contained in:
parent
54c39d09ba
commit
140a351fc5
33 changed files with 46 additions and 37 deletions
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue