mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix Add-Path for self-hosted Windows
This commit is contained in:
parent
4969814b69
commit
1a2cb4f872
@ -88,6 +88,7 @@ Function Add-Path {
|
|||||||
}
|
}
|
||||||
if ($env:GITHUB_PATH) {
|
if ($env:GITHUB_PATH) {
|
||||||
Add-Content $PathItem -Path $env:GITHUB_PATH -Encoding utf8
|
Add-Content $PathItem -Path $env:GITHUB_PATH -Encoding utf8
|
||||||
|
$env:PATH += "$PathItem;"
|
||||||
} else {
|
} else {
|
||||||
$newPath = (Get-ItemProperty -Path 'hkcu:\Environment' -Name PATH).Path.replace("$PathItem;", '')
|
$newPath = (Get-ItemProperty -Path 'hkcu:\Environment' -Name PATH).Path.replace("$PathItem;", '')
|
||||||
$newPath = $PathItem + ';' + $newPath
|
$newPath = $PathItem + ';' + $newPath
|
||||||
|
Loading…
Reference in New Issue
Block a user