GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Refactor TelemetryOptout constant · PowerShell/PowerShell@a54f7dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/Microsoft.PowerShell.ConsoleHost/host/msh
    • Telemetry.cs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Microsoft.PowerShell.ConsoleHost/host/msh/Telemetry.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.PowerShell.ConsoleHost/host/msh/Telemetry.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal static class ApplicationInsightsTelemetry
2121
// The name of the file by when present in $PSHOME will enable telemetry.
2222
// If this file is not present, no telemetry will be sent.
2323
private const string TelemetrySemaphoreFilename = "DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY";
24-
private const string TelemetryOptout = "POWERSHELL_TELEMETRY_OPTOUT";
24+
private const string TelemetryOptoutEnvVar = "POWERSHELL_TELEMETRY_OPTOUT";
2525

2626
// The path to the semaphore file which enables telemetry
2727
private static string TelemetrySemaphoreFilePath = Path.Combine(
@@ -73,7 +73,7 @@ private static void SendTelemetry(string eventName, Dictionary<string,string>pay
7373
try
7474
{
7575
// if the semaphore file exists, try to send telemetry
76-
var Enabled = Utils.NativeFileExists(TelemetrySemaphoreFilePath) && !GetEnvironmentVariableAsBool(TelemetryOptout, false);
76+
var Enabled = Utils.NativeFileExists(TelemetrySemaphoreFilePath) && !GetEnvironmentVariableAsBool(TelemetryOptoutEnvVar, false);
7777

7878
if ( ! Enabled )
7979
{

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.