Skip to content

Commit 20a2b1d

Browse files
committed
fix: can't use has to check if we have a bastion host
1 parent 39646dd commit 20a2b1d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Command/Cache/CacheTunnelCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function perform(InputInterface $input, ConsoleOutput $output)
8383

8484
$network = $this->apiClient->getNetwork($cache['network']['id']);
8585

86-
if (!$network->has('bastion_host')) {
86+
if (!is_array($network->get('bastion_host'))) {
8787
throw new RuntimeException(sprintf('The cache network does\'t have a bastion host to connect to. You can add one to the network with the "%s" command.', AddBastionHostCommand::NAME));
8888
} elseif (!is_dir($this->homeDirectory.'/.ssh')) {
8989
$this->filesystem->mkdir($this->homeDirectory.'/.ssh', 0700);

src/Command/Database/DatabaseServerTunnelCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function perform(InputInterface $input, ConsoleOutput $output)
8585

8686
$network = $this->apiClient->getNetwork($databaseServer['network']['id']);
8787

88-
if (!$network->has('bastion_host')) {
88+
if (!is_array($network->get('bastion_host'))) {
8989
throw new RuntimeException(sprintf('The database server network does\'t have a bastion host to connect to. You can add one to the network with the "%s" command.', AddBastionHostCommand::NAME));
9090
} elseif (!is_dir($this->homeDirectory.'/.ssh')) {
9191
$this->filesystem->mkdir($this->homeDirectory.'/.ssh', 0700);

0 commit comments

Comments
 (0)