File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Potsky/LaravelLocalizationHelpers/Commands Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -316,18 +316,24 @@ public function fire()
316316 }
317317
318318 $ this ->line ( 'Save files: ' );
319+ $ open_files = '' ;
319320 foreach ($ job as $ file_lang_path => $ file_content ) {
320321 if ( ! $ this ->option ( 'dry-run ' ) ) {
321322 file_put_contents ( $ file_lang_path , $ file_content );
322323 }
323324 $ this ->line ( " <info> " . $ this ->get_short_path ( $ file_lang_path ) );
324325 if ( $ this ->option ('editor ' ) ) {
325- exec ( $ this -> editor . ' ' . $ file_lang_path );
326+ $ open_files .= ' ' . escapeshellarg ( $ file_lang_path );
326327 }
327328 }
328329 $ this ->line ( '' );
329330
330331 $ this ->info ( 'Process done! ' );
332+
333+ if ( $ this ->option ('editor ' ) ) {
334+ exec ( $ this ->editor . $ open_files );
335+ }
336+
331337 } else {
332338 $ this ->line ( '' );
333339 $ this ->comment ( 'Process aborted. No file have been changed. ' );
You can’t perform that action at this time.
0 commit comments