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 }