File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -97,22 +97,16 @@ public static function init($baseDir = "", $verbose = true) {
97
97
// set the baseDir option
98
98
self ::$ options ["baseDir " ] = ($ baseDir [strlen ($ baseDir )-1 ] == DIRECTORY_SEPARATOR ) ? $ baseDir : $ baseDir .DIRECTORY_SEPARATOR ;
99
99
100
+ // set-up the paths
101
+ self ::$ userConfigDirClean = self ::$ options ["baseDir " ].self ::$ userConfigDirClean ;
102
+ self ::$ userConfigDirDash = self ::$ options ["baseDir " ].self ::$ userConfigDirDash ;
103
+ self ::$ userConfigDir = (is_dir (self ::$ userConfigDirDash )) ? self ::$ userConfigDirDash : self ::$ userConfigDirClean ;
104
+ self ::$ userConfigPath = self ::$ userConfigDir .DIRECTORY_SEPARATOR .self ::$ userConfig ;
105
+ self ::$ plConfigPath = self ::$ options ["baseDir " ]."vendor/pattern-lab/core/ " .self ::$ plConfigPath ;
106
+
100
107
// can't add __DIR__ above so adding here
101
- if (!self ::$ dirAdded ) {
102
-
103
- // set-up the paths
104
- self ::$ userConfigDirClean = self ::$ options ["baseDir " ].self ::$ userConfigDirClean ;
105
- self ::$ userConfigDirDash = self ::$ options ["baseDir " ].self ::$ userConfigDirDash ;
106
- self ::$ userConfigDir = (is_dir (self ::$ userConfigDirDash )) ? self ::$ userConfigDirDash : self ::$ userConfigDirClean ;
107
- self ::$ userConfigPath = self ::$ userConfigDir .DIRECTORY_SEPARATOR .self ::$ userConfig ;
108
- self ::$ plConfigPath = self ::$ options ["baseDir " ]."vendor/pattern-lab/core/ " .self ::$ plConfigPath ;
109
- self ::$ dirAdded = true ;
110
-
111
- // just in case the config directory doesn't exist at all
112
- if (!is_dir (self ::$ userConfigDir )) {
113
- mkdir (self ::$ userConfigDir );
114
- }
115
-
108
+ if (!is_dir (self ::$ userConfigDir )) {
109
+ mkdir (self ::$ userConfigDir );
116
110
}
117
111
118
112
// make sure migrate doesn't happen by default
You can’t perform that action at this time.
0 commit comments