diff --git a/config/prod/services.yml b/config/prod/services.yml index e2dc31e2e..2ba0c2337 100644 --- a/config/prod/services.yml +++ b/config/prod/services.yml @@ -47,7 +47,6 @@ services: parent: Acquia\Cli\Command\CommandBase exclude: - ../../src/Command/CommandBase.php - - ../../src/Command/Acsf/AcsfCommandBase.php - ../../src/Command/Acsf/AcsfListCommand.php - ../../src/Command/Acsf/AcsfListCommandBase.php - ../../src/Command/Acsf/AcsfApiBaseCommand.php diff --git a/src/Command/Auth/AuthAcsfLogoutCommand.php b/src/Command/Auth/AuthAcsfLogoutCommand.php index a3360d949..b979871fa 100644 --- a/src/Command/Auth/AuthAcsfLogoutCommand.php +++ b/src/Command/Auth/AuthAcsfLogoutCommand.php @@ -22,11 +22,11 @@ protected function commandRequiresAuthentication(): bool { } protected function execute(InputInterface $input, OutputInterface $output): int { - if (!$this->cloudApiClientService->isMachineAuthenticated()) { + $factories = $this->datastoreCloud->get('acsf_factories'); + if (empty($factories)) { $this->io->error(['You are not logged into any factories.']); - return 1; + return Command::FAILURE; } - $factories = $this->datastoreCloud->get('acsf_factories'); foreach ($factories as $url => $factory) { $factories[$url]['url'] = $url; }