This repository was archived by the owner on Feb 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,6 @@ public function getConfig() {
53
53
// check to see if the user config exists, if not create it
54
54
print "configuring pattern lab... \n" ;
55
55
if (!file_exists ($ this ->userConfigPath )) {
56
- if (!@copy ($ this ->plConfigPath , $ this ->userConfigPath )) {
57
- print "Please make sure that Pattern Lab can write a new config to config/. \n" ;
58
- exit ;
59
- }
60
56
$ migrate = true ;
61
57
} else {
62
58
$ config = parse_ini_file ($ this ->userConfigPath );
@@ -70,8 +66,15 @@ public function getConfig() {
70
66
print "upgrading your version of pattern lab... \n" ;
71
67
print "checking for migrations... \n" ;
72
68
$ m = new Migrator ;
73
- $ m ->migrate ($ diffVersion );
74
- $ config = $ this ->writeNewConfig ($ config ,$ defaultConfig );
69
+ $ m ->migrate (true );
70
+ if ($ migrate ) {
71
+ if (!@copy ($ this ->plConfigPath , $ this ->userConfigPath )) {
72
+ print "Please make sure that Pattern Lab can write a new config to config/. \n" ;
73
+ exit ;
74
+ }
75
+ } else {
76
+ $ config = $ this ->writeNewConfig ($ config ,$ defaultConfig );
77
+ }
75
78
}
76
79
77
80
return $ config ;
You can’t perform that action at this time.
0 commit comments