diff --git a/src/Console/HashCommand.php b/src/Console/HashCommand.php index 0831e0d16..5c1d23393 100644 --- a/src/Console/HashCommand.php +++ b/src/Console/HashCommand.php @@ -12,7 +12,7 @@ class HashCommand extends Command * * @var string */ - protected $signature = 'passport:hash'; + protected $signature = 'passport:hash {--force : Force the operation to run without confirmation prompt}'; /** * The console command description. @@ -34,7 +34,7 @@ public function handle() return; } - if ($this->confirm('Are you sure you want to hash all client secrets? This cannot be undone.')) { + if ($this->option('force') || $this->confirm('Are you sure you want to hash all client secrets? This cannot be undone.')) { $model = Passport::clientModel(); foreach ((new $model)->whereNotNull('secret')->cursor() as $client) {