diff --git a/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php b/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php index 2c47d1ff7..846e13192 100644 --- a/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php +++ b/modules/acquia_cms_common/src/EventSubscriber/KernelTerminate/AcquiaCmsTelemetry.php @@ -138,7 +138,7 @@ public static function getSubscribedEvents(): array { * @throws \Exception */ public function onTerminateResponse(KernelEvent $event): void { - if ($this->shouldSendTelemetryData()) { + if ($this->shouldSendTelemetryData() && PHP_SAPI !== 'cli') { $this->sendTelemetry("ACMS Telemetry data", $this->getAcquiaCmsTelemetryData()); } }