File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
ProcessMaker/Console/Commands Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ public function handle()
108108
109109 // Check if an existing lang folder is provided
110110 $ langFolderOption = $ this ->option ('lang-folder ' , null );
111+ $ sourceLangPath = resource_path ('lang ' );
111112 $ tenantLangPath = resource_path ('lang/tenant_ ' . $ tenant ->id );
112113 if ($ langFolderOption ) {
113114 if (File::isDirectory ($ langFolderOption )) {
@@ -131,6 +132,18 @@ public function handle()
131132 }
132133 }
133134
135+ $ cmd = sprintf (
136+ "rsync -azv --ignore-existing --exclude='tenant_*' %s %s " ,
137+ escapeshellarg ($ sourceLangPath . '/ ' ),
138+ escapeshellarg ($ tenantLangPath )
139+ );
140+ exec ($ cmd , $ output , $ returnVar );
141+ if ($ returnVar !== 0 ) {
142+ $ this ->error ('Failed to rsync lang folder to tenant: ' . implode (PHP_EOL , $ output ));
143+
144+ return 1 ;
145+ }
146+
134147 $ subfolders = [
135148 'app ' ,
136149 'app/private ' ,
You can’t perform that action at this time.
0 commit comments