Skip to content

Commit

Permalink
Update RecordDeleteCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
orkhanahmadov authored Jan 17, 2024
1 parent 4aa65a3 commit 8d1b830
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Commands/RecordDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ protected function configure()
->addArgument('type', InputArgument::REQUIRED, 'The record type')
->addArgument('name', InputArgument::OPTIONAL, 'The record name')
->addArgument('value', InputArgument::OPTIONAL, 'The record value')
->addOption('force', false, InputOption::VALUE_NONE, 'Force deletion of the record without confirmation')

Check failure on line 23 in src/Commands/RecordDeleteCommand.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Access to constant VALUE_NONE on an unknown class Laravel\VaporCli\Commands\InputOption.
->setDescription('Delete a DNS record');
}

Expand All @@ -30,7 +31,9 @@ protected function configure()
*/
public function handle()
{
if (! Helpers::confirm('Are you sure you want to delete this record', false)) {
$forceDeletion = $this->option('force', false);

if (! $forceDeletion && ! Helpers::confirm('Are you sure you want to delete this record', false)) {
Helpers::abort('Action cancelled.');
}

Expand Down

0 comments on commit 8d1b830

Please sign in to comment.