mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Windows] Use common approach to set machine vars (#8830)
This commit is contained in:
committed by
GitHub
parent
045a0de8e2
commit
07e8da79f8
@@ -23,9 +23,9 @@ New-Item -Path "$ghcupPrefix\ghcup" -ItemType 'directory' -ErrorAction SilentlyC
|
||||
New-Item -Path "$ghcupPrefix\ghcup\bin" -ItemType 'directory' -ErrorAction SilentlyContinue | Out-Null
|
||||
Start-DownloadWithRetry -Url $ghcupDownloadURL -Name "ghcup.exe" -DownloadPath "$ghcupPrefix\ghcup\bin"
|
||||
|
||||
Set-SystemVariable "GHCUP_INSTALL_BASE_PREFIX" $ghcupPrefix
|
||||
Set-SystemVariable "GHCUP_MSYS2" $msysPath
|
||||
Set-SystemVariable "CABAL_DIR" $cabalDir
|
||||
[System.Environment]::SetEnvironmentVariable("GHCUP_INSTALL_BASE_PREFIX", $ghcupPrefix, "Machine")
|
||||
[System.Environment]::SetEnvironmentVariable("GHCUP_MSYS2", $msysPath, "Machine")
|
||||
[System.Environment]::SetEnvironmentVariable("CABAL_DIR", $cabalDir, "Machine")
|
||||
Add-MachinePathItem "$ghcupPrefix\ghcup\bin"
|
||||
Add-MachinePathItem "$cabalDir\bin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user