Skip to content

Add Distribution Channel #1158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 14, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public sealed class StartEditorServicesCommand : PSCmdlet

public StartEditorServicesCommand()
{
SetDistributionChannel();
_disposableResources = new List<IDisposable>();
_loggerUnsubscribers = new List<IDisposable>();
}
Expand Down Expand Up @@ -278,6 +279,12 @@ private void StartLogging()

_logger.Log(PsesLogLevel.Diagnostic, "Logging started");
}

private static SetDistributionChannel()
{
//Sets the distribution channel to PSES so starts can be distinguished in PS7+ telemetry
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", "PSES");
}

private string GetLogDirPath()
{
Expand Down