diff --git a/src/Command/Api/ApiBaseCommand.php b/src/Command/Api/ApiBaseCommand.php index 8baebf8fe..c4d5d5992 100644 --- a/src/Command/Api/ApiBaseCommand.php +++ b/src/Command/Api/ApiBaseCommand.php @@ -6,6 +6,7 @@ use Acquia\Cli\Attribute\RequireAuth; use Acquia\Cli\Command\CommandBase; +use Acquia\Cli\Exception\AcquiaCliException; use AcquiaCloudApi\Connector\Client; use AcquiaCloudApi\Exception\ApiErrorException; use Closure; @@ -87,6 +88,9 @@ protected function interact(InputInterface $input, OutputInterface $output): voi } protected function execute(InputInterface $input, OutputInterface $output): int { + if ($this->getName() === 'api:base') { + throw new AcquiaCliException('api:base is not a valid command'); + } // Build query from non-null options. $acquiaCloudClient = $this->cloudApiClientService->getClient(); $this->addQueryParamsToClient($input, $acquiaCloudClient);