autoinit on upgrade
This commit is contained in:
parent
11935c4d6f
commit
f08149207c
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,8 @@ module Command.Upgrade where
|
||||||
|
|
||||||
import Command
|
import Command
|
||||||
import Upgrade
|
import Upgrade
|
||||||
|
import Annex.Version
|
||||||
|
import Annex.Init
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = dontCheck repoExists $ -- because an old version may not seem to exist
|
cmd = dontCheck repoExists $ -- because an old version may not seem to exist
|
||||||
|
@ -22,5 +24,7 @@ seek = withNothing start
|
||||||
start :: CommandStart
|
start :: CommandStart
|
||||||
start = do
|
start = do
|
||||||
showStart "upgrade" "."
|
showStart "upgrade" "."
|
||||||
|
whenM (isNothing <$> getVersion) $ do
|
||||||
|
initialize Nothing Nothing
|
||||||
r <- upgrade False
|
r <- upgrade False
|
||||||
next $ next $ return r
|
next $ next $ return r
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue