File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -48,20 +48,21 @@ func (m Migration) Apply(opts migrate.Options) error {
4848 return err
4949 }
5050
51- // Write new version before opening repo, so that opening the repo does not
52- // result in an error stating the repo needs a migration (since this is the
53- // migration).
54- err = mfsr .RepoPath (opts .Path ).WriteVersion ("11" )
55- if err != nil {
56- log .Error ("failed to update version file to 11" )
57- return err
58- }
51+ // Set to previous version to avoid "needs migration" error. This is safe
52+ // for this migration since repo has not changed.
53+ fsrepo .RepoVersion = 10
5954
6055 if err = transferPins (opts .Path ); err != nil {
6156 log .Error ("failed to transfer pins:" , err .Error ())
6257 return err
6358 }
6459
60+ err = mfsr .RepoPath (opts .Path ).WriteVersion ("11" )
61+ if err != nil {
62+ log .Error ("failed to update version file to 11" )
63+ return err
64+ }
65+
6566 log .Log ("updated version file" )
6667 return nil
6768}
You can’t perform that action at this time.
0 commit comments