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 @@ -106,6 +106,7 @@ public function handle()
106106
107107 // Check if an existing lang folder is provided
108108 $ langFolderOption = $ this ->option ('lang-folder ' , null );
109+ $ sourceLangPath = resource_path ('lang ' );
109110 $ tenantLangPath = resource_path ('lang/tenant_ ' . $ tenant ->id );
110111 if ($ langFolderOption ) {
111112 if (File::isDirectory ($ langFolderOption )) {
@@ -129,6 +130,18 @@ public function handle()
129130 }
130131 }
131132
133+ $ cmd = sprintf (
134+ "rsync -azv --ignore-existing --exclude='tenant_*' %s %s " ,
135+ escapeshellarg ($ sourceLangPath . '/ ' ),
136+ escapeshellarg ($ tenantLangPath )
137+ );
138+ exec ($ cmd , $ output , $ returnVar );
139+ if ($ returnVar !== 0 ) {
140+ $ this ->error ('Failed to rsync lang folder to tenant: ' . implode (PHP_EOL , $ output ));
141+
142+ return 1 ;
143+ }
144+
132145 $ subfolders = [
133146 'app ' ,
134147 'app/private ' ,
You can’t perform that action at this time.
0 commit comments