File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
ProcessMaker/Console/Commands Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class TenantsCreate extends Command
2727 {--storage-folder=}
2828 {--lang-folder=}
2929 {--app-key=}
30- {--skip-initialize-storage-folder }
30+ {--skip-initialize-folders }
3131 {--skip-setup-notifications} ' ;
3232
3333 /**
@@ -140,6 +140,15 @@ public function handle()
140140 }
141141 }
142142
143+ if (!$ this ->option ('skip-initialize-folders ' )) {
144+ $ cmd = sprintf (
145+ "rsync -azv --ignore-existing --exclude='tenant_*' %s %s " ,
146+ escapeshellarg ($ sourceLangPath . '/ ' ),
147+ escapeshellarg ($ tenantLangPath )
148+ );
149+ Process::run ($ cmd , $ infoCallback )->throw ();
150+ }
151+
143152 $ subfolders = [
144153 'app ' ,
145154 'app/private ' ,
@@ -161,7 +170,7 @@ public function handle()
161170 'api-docs ' ,
162171 ];
163172
164- if (!$ this ->option ('skip-initialize-storage-folder ' )) {
173+ if (!$ this ->option ('skip-initialize-folders ' )) {
165174 foreach ($ subfolders as $ subfolder ) {
166175 if (!File::isDirectory ($ tenantStoragePath . '/ ' . $ subfolder )) {
167176 mkdir ($ tenantStoragePath . '/ ' . $ subfolder , 0755 , true );
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public function handle()
100100 '--name ' => config ('app.name ' ),
101101 '--app-key ' => config ('app.key ' ),
102102 '--skip-setup-notifications ' => true ,
103- '--skip-initialize-storage-folder ' => true ,
103+ '--skip-initialize-folders ' => true ,
104104 ], $ this ->output );
105105
106106 if ($ exitCode !== 0 ) {
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ private function processEnvFile(string $envFilePath)
130130 '--password ' => $ envVars ['DB_PASSWORD ' ],
131131 '--app-key ' => $ envVars ['APP_KEY ' ],
132132 '--skip-setup-notifications ' => true ,
133- '--skip-initialize-storage-folder ' => true ,
133+ '--skip-initialize-folders ' => true ,
134134 ];
135135
136136 $ exitCode = Artisan::call ('tenants:create ' , $ command , $ this ->output );
You can’t perform that action at this time.
0 commit comments