diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-03-31 17:20:43 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-31 17:20:43 -0400 |
commit | 906f84620ddeb972a2ab73cbf1a9cd24a8ed2a66 (patch) | |
tree | f5f01cc3a92f88bd301331b882bf9cfa4f0abd65 /Command | |
parent | e4d26871077f5a9af3445dc2f88fd743851db53d (diff) |
autoinit on upgrade
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Upgrade.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Command/Upgrade.hs b/Command/Upgrade.hs index 432250a1a..223be581d 100644 --- a/Command/Upgrade.hs +++ b/Command/Upgrade.hs @@ -9,6 +9,8 @@ module Command.Upgrade where import Command import Upgrade +import Annex.Version +import Annex.Init cmd :: Command cmd = dontCheck repoExists $ -- because an old version may not seem to exist @@ -22,5 +24,7 @@ seek = withNothing start start :: CommandStart start = do showStart "upgrade" "." + whenM (isNothing <$> getVersion) $ do + initialize Nothing Nothing r <- upgrade False next $ next $ return r |