Skip to content

Commit

Permalink
Add check for LanguageMode and exit early with exit code 0 if the scr…
Browse files Browse the repository at this point in the history
…ipt would otherwise fail
  • Loading branch information
mast-eu committed Oct 15, 2019
1 parent 17e9d82 commit 31d4f41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Bin/set-telemetry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Param(

[bool]$telemetryEnabled = -not [string]::IsNullOrEmpty($Enabled);

if ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage")
{
exit 0
}

[string]$userAppDataPath = Join-Path -Path $env:APPDATA -ChildPath 'GitExtensions\GitExtensions\GitExtensions.settings'
if (-not (Test-Path -Path $userAppDataPath)) {
[string]$userAppDataFolder = Split-Path $userAppDataPath -Parent
Expand Down

0 comments on commit 31d4f41

Please sign in to comment.