mirror of
https://github.com/actions/runner-images.git
synced 2026-01-10 20:52:45 +08:00
resolve comments
This commit is contained in:
16
images/win/post-generation/Update-MercurialPath.ps1
Normal file
16
images/win/post-generation/Update-MercurialPath.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
$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"
|
||||
Reference in New Issue
Block a user