Skip to content
Permalink
Browse files

base: restore: Re-run platform check before restoring

Since we exclude the migration code from the platform check, let's redo
the platform check in restore just to make sure that we're running
a base installation for the correct platform.
  • Loading branch information
neverpanic committed Mar 11, 2018
1 parent 7eda6cf commit 6c89b79a8101ddfb5383e66405b4ad0bbb7ce8ec
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/macports1.0/restore.tcl
@@ -31,6 +31,7 @@
package provide restore 1.0

package require macports 1.0
package require migrate 1.0
package require registry 1.0
package require snapshot 1.0

@@ -53,6 +54,11 @@ namespace eval restore {

array set options $opts

if {[migrate::needs_migration]} {
ui_error "You need to run 'sudo port migrate' before running restore"
return 1
}

if {[info exists options(ports_restore_snapshot-id)]} {
# use the specified snapshot
set snapshot [fetch_snapshot $options(ports_restore_snapshot-id)]

0 comments on commit 6c89b79

Please sign in to comment.
You can’t perform that action at this time.