Skip to content

Commit 1f9dde9

Browse files
committed
fix: don't cancel if we don't want to add a nat gateway
1 parent 2da7466 commit 1f9dde9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Command/Database/CreateDatabaseServerCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Tightenco\Collect\Support\Collection;
2323
use Ymir\Cli\Command\AbstractCommand;
2424
use Ymir\Cli\Console\ConsoleOutput;
25-
use Ymir\Cli\Exception\CommandCancelledException;
2625

2726
class CreateDatabaseServerCommand extends AbstractCommand
2827
{
@@ -65,8 +64,8 @@ protected function perform(InputInterface $input, ConsoleOutput $output)
6564
$storage = $this->determineStorage($input, $output);
6665
$public = $this->determinePublic($input, $output);
6766

68-
if (!$public && !$network->get('has_nat_gateway') && !$output->confirm('A private database server will require Ymir to add a NAT gateway to your network (~$32/month). Would you like to proceed?')) {
69-
throw new CommandCancelledException();
67+
if (!$public && !$network->get('has_nat_gateway') && !$output->confirm('A private database server will require Ymir to add a NAT gateway to your network (~$32/month). Would you like to proceed? (Answering "no" will make the database server publicly accessible.)')) {
68+
$public = true;
7069
}
7170

7271
$database = $this->apiClient->createDatabaseServer($name, (int) $network['id'], $type, $storage, $public);

0 commit comments

Comments
 (0)