Skip to content

Commit e82a6d2

Browse files
author
Aaron Huisinga
authored
Add force option to hash command (#1251)
1 parent a368f9e commit e82a6d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/HashCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class HashCommand extends Command
1212
*
1313
* @var string
1414
*/
15-
protected $signature = 'passport:hash';
15+
protected $signature = 'passport:hash {--force : Force the operation to run without confirmation prompt}';
1616

1717
/**
1818
* The console command description.
@@ -34,7 +34,7 @@ public function handle()
3434
return;
3535
}
3636

37-
if ($this->confirm('Are you sure you want to hash all client secrets? This cannot be undone.')) {
37+
if ($this->option('force') || $this->confirm('Are you sure you want to hash all client secrets? This cannot be undone.')) {
3838
$model = Passport::clientModel();
3939

4040
foreach ((new $model)->whereNotNull('secret')->cursor() as $client) {

0 commit comments

Comments
 (0)