From e82a6d2731c34d4dbea3bf19ce6c363f3980358e Mon Sep 17 00:00:00 2001 From: Aaron Huisinga Date: Thu, 7 May 2020 16:10:18 -0500 Subject: [PATCH] Add force option to hash command (#1251) --- src/Console/HashCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {