From 7b61d7faef0aa1a891028daefa43ab2be5bf33b1 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Thu, 6 Mar 2025 10:56:51 +0100 Subject: [PATCH] use env var --- cmd/root/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root/root.go b/cmd/root/root.go index 6e4448ad1..dbe893baf 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -178,7 +178,7 @@ func uploadTelemetry(ctx context.Context, cmdStr string, startTime time.Time, ex } // Telemetry is disabled. We don't upload logs. - if os.Getenv(telemetry.DisableEnvVar) != "" { + if env.Get(ctx, telemetry.DisableEnvVar) != "" { log.Debugf(ctx, "telemetry upload is disabled. Not uploading any logs.") return }