mirror of
https://github.com/actions/runner-images.git
synced 2025-12-28 12:48:21 +08:00
16 lines
551 B
PowerShell
16 lines
551 B
PowerShell
$hgPath = "$Env:ProgramFiles\Mercurial\"
|
|
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
|
|
if (Test-Path -Path $hgPath)
|
|
{
|
|
$latestPath = "$hgPath;$latestPath"
|
|
Write-Host "Added Mercurial to PATH"
|
|
$isPathUpdated = $true
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Didn't find Mercurial at $hgPath. Skipping adding PATH to it."
|
|
}
|
|
|
|
$updatedPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
Write-Host "Windows PATH: $updatedPath" |