Skip to content

Commit

Permalink
Fix GitExtensions.settings creation on a new installation
Browse files Browse the repository at this point in the history
(cherry picked from commit abac1b4)
  • Loading branch information
RussKie authored and mast-eu committed Oct 15, 2019
1 parent 8a80216 commit 0761740
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Bin/set-telemetry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Param(

[string]$userAppDataPath = Join-Path -Path $env:APPDATA -ChildPath 'GitExtensions\GitExtensions\GitExtensions.settings'
if (-not (Test-Path -Path $userAppDataPath)) {
'<?xml version="1.0" encoding="utf-8"?><dictionary />' | Out-File $userAppDataPath -Encoding utf8
[string]$userAppDataFolder = Split-Path $userAppDataPath -Parent
if (-not (Test-Path -Path $userAppDataFolder)) {
New-Item -ItemType Directory -Path $userAppDataFolder | Out-Null
}

'<?xml version="1.0" encoding="utf-8"?><dictionary />' | Out-File $userAppDataPath -Encoding utf8
}

[xml]$doc = Get-Content $userAppDataPath
Expand Down

0 comments on commit 0761740

Please sign in to comment.