From f022523e16fca90b2170b30fec2f6ba130f52cde Mon Sep 17 00:00:00 2001 From: Michal Kleszcz Date: Mon, 24 Jun 2024 17:05:56 +0200 Subject: [PATCH] fix: #587 Fix CLI telemetry opt-out --- packages/internal/cli/src/config/env.ts | 4 ++-- packages/internal/cli/src/config/telemetry.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/internal/cli/src/config/env.ts b/packages/internal/cli/src/config/env.ts index df7c15b51..a87ecd497 100644 --- a/packages/internal/cli/src/config/env.ts +++ b/packages/internal/cli/src/config/env.ts @@ -17,9 +17,9 @@ export const ENV_STAGE_LOCAL = 'local'; export const IS_CI = Boolean(process.env.CI ?? false); export const SB_TELEMETRY_DISABLED = - IS_CI || (Boolean(process.env.SB_TELEMETRY_DISABLED) ?? false); + IS_CI || process.env.SB_TELEMETRY_DISABLED == '1'; export const SB_TELEMETRY_DEBUG = - IS_CI || (Boolean(process.env.SB_TELEMETRY_DEBUG) ?? false); + IS_CI || process.env.SB_TELEMETRY_DEBUG == '1'; export const SB_TELEMETRY_URL = process.env.SB_TELEMETRY_URL ?? sbTelemetry[0]; diff --git a/packages/internal/cli/src/config/telemetry.ts b/packages/internal/cli/src/config/telemetry.ts index f9eab8adc..9b3ee0602 100644 --- a/packages/internal/cli/src/config/telemetry.ts +++ b/packages/internal/cli/src/config/telemetry.ts @@ -28,7 +28,7 @@ export const provider = new NodeTracerProvider({ [SemanticResourceAttributes.OS_TYPE]: os.type(), [SemanticResourceAttributes.OS_DESCRIPTION]: os.release(), [SemanticResourceAttributes.OS_VERSION]: os.version(), - }) + }), ), });