Merge pull request #395 from ipfs/fix/upgrade-empty-state

Fix: do not fail when running daemon --upgrade and no state exists
This commit is contained in:
Hector Sanjuan 2018-04-27 07:54:33 +02:00 committed by GitHub
commit 695177a080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -451,7 +451,9 @@ func daemon(c *cli.Context) error {
// Run any migrations
if c.Bool("upgrade") {
err := upgrade()
checkErr("upgrading state", err)
if err != errNoSnapshot {
checkErr("upgrading state", err)
} // otherwise continue
}
// Execution lock