From 1bfb719e8b2bf20425fd69493122c10fabbf2337 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 20 Mar 2024 14:57:36 +0000 Subject: [PATCH] Set deployment type at deployment type check --- .../cli/atlas/deployments/options/deployment_opts.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/cli/atlas/deployments/options/deployment_opts.go b/internal/cli/atlas/deployments/options/deployment_opts.go index a527a23413..746e856364 100644 --- a/internal/cli/atlas/deployments/options/deployment_opts.go +++ b/internal/cli/atlas/deployments/options/deployment_opts.go @@ -242,11 +242,19 @@ func (opts *DeploymentOpts) ValidateAndPromptDeploymentType() error { } func (opts *DeploymentOpts) IsAtlasDeploymentType() bool { - return strings.EqualFold(opts.DeploymentType, AtlasCluster) + if strings.EqualFold(opts.DeploymentType, AtlasCluster) { + telemetry.AppendOption(telemetry.WithDeploymentType(AtlasCluster)) + return true + } + return false } func (opts *DeploymentOpts) IsLocalDeploymentType() bool { - return strings.EqualFold(opts.DeploymentType, LocalCluster) + if strings.EqualFold(opts.DeploymentType, LocalCluster) { + telemetry.AppendOption(telemetry.WithDeploymentType(LocalCluster)) + return true + } + return false } func (opts *DeploymentOpts) NoDeploymentTypeSet() bool {