File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ class ChangeOwnerConfigJson extends Command
1111 *
1212 * @var string
1313 */
14- protected $ signature = 'config-json:change-owner {--user= : user} ' ;
14+ protected $ signature = 'config-json:change-owner
15+ {user : The user to change owner}
16+ {group? : The group to change owner} ' ;
1517
1618 /**
1719 * The console command description.
@@ -27,10 +29,12 @@ class ChangeOwnerConfigJson extends Command
2729 */
2830 public function handle (): void
2931 {
30- $ user = $ this ->option ('user ' );
32+ $ user = $ this ->argument ('user ' );
33+ $ group = $ this ->argument ('group ' ) ?? $ user ;
34+
3135 $ jsonsPath = config ('telegram-git-notifier.data_file.storage_folder ' );
3236 if (is_string ($ jsonsPath ) && file_exists ($ jsonsPath )) {
33- exec ("chown -R $ user: $ user $ jsonsPath " );
37+ exec ("chown -R $ user: $ group $ jsonsPath " );
3438 }
3539 }
3640}
You can’t perform that action at this time.
0 commit comments