We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c46ec79 + 5942116 commit d4d5261Copy full SHA for d4d5261
1 file changed
src/Console/JWTGenerateSecretCommand.php
@@ -23,6 +23,7 @@ class JWTGenerateSecretCommand extends Command
23
*/
24
protected $signature = 'jwt:secret
25
{--s|show : Display the key instead of modifying files.}
26
+ {--always-no : Skip generating key if it already exists.}
27
{--f|force : Skip confirmation when overwriting an existing key.}';
28
29
/**
@@ -55,6 +56,12 @@ public function handle()
55
56
// create new entry
57
file_put_contents($path, PHP_EOL."JWT_SECRET=$key".PHP_EOL, FILE_APPEND);
58
} else {
59
+ if ($this->option('always-no')) {
60
+ $this->comment('Secret key already exists. Skipping...');
61
+
62
+ return;
63
+ }
64
65
if ($this->isConfirmed() === false) {
66
$this->comment('Phew... No changes were made to your secret key.');
67
0 commit comments