Fix Add-Path for self-hosted Windows

This commit is contained in:
Dino Infantino 2022-06-23 10:51:33 +01:00
parent 4969814b69
commit 1a2cb4f872

View File

@ -88,6 +88,7 @@ Function Add-Path {
}
if ($env:GITHUB_PATH) {
Add-Content $PathItem -Path $env:GITHUB_PATH -Encoding utf8
$env:PATH += "$PathItem;"
} else {
$newPath = (Get-ItemProperty -Path 'hkcu:\Environment' -Name PATH).Path.replace("$PathItem;", '')
$newPath = $PathItem + ';' + $newPath