File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ func main() {
145145 target := flag .Int ("to" , CurrentVersion , "specify version to upgrade to" )
146146 yes := flag .Bool ("y" , false , "answer yes to all prompts" )
147147 version := flag .Bool ("v" , false , "print highest repo version and exit" )
148+ revertOk := flag .Bool ("revert-ok" , false , "allow running migrations backward" )
148149
149150 flag .Parse ()
150151
@@ -170,6 +171,11 @@ func main() {
170171 os .Exit (1 )
171172 }
172173
174+ if vnum > * target && ! * revertOk {
175+ fmt .Println ("ipfs migration: attempt to run backward migration\n To allow, run this command again with --revert-ok" )
176+ os .Exit (1 )
177+ }
178+
173179 if vnum == * target {
174180 fmt .Println ("ipfs migration: already at target version number" )
175181 return
You can’t perform that action at this time.
0 commit comments