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() {
5353 // check to see if the user config exists, if not create it
5454 print "configuring pattern lab... \n" ;
5555 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- }
6056 $ migrate = true ;
6157 } else {
6258 $ config = parse_ini_file ($ this ->userConfigPath );
@@ -70,8 +66,15 @@ public function getConfig() {
7066 print "upgrading your version of pattern lab... \n" ;
7167 print "checking for migrations... \n" ;
7268 $ 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+ }
7578 }
7679
7780 return $ config ;
You can’t perform that action at this time.
0 commit comments