Merge pull request #609 from dino182/develop

Fix Add-Path for self-hosted Windows
This commit is contained in:
Shivam Mathur 2022-06-27 17:24:50 +05:30 committed by GitHub
commit 3fda17f3fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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