mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
* Apply code style rules to Windows scripts * Fix typo * Fix configure-toolset script * Fix parameters in Msys2 installation script * Improve log readability * Remove broken exit code validation
15 lines
586 B
PowerShell
15 lines
586 B
PowerShell
################################################################################
|
|
## File: Configure-SystemEnvironment.ps1
|
|
## Desc: Configures system environment variables
|
|
################################################################################
|
|
|
|
$variables = @{
|
|
"ImageVersion" = $env:IMAGE_VERSION
|
|
"ImageOS" = $env:IMAGE_OS
|
|
"AGENT_TOOLSDIRECTORY" = $env:AGENT_TOOLSDIRECTORY
|
|
}
|
|
|
|
$variables.GetEnumerator() | ForEach-Object {
|
|
[Environment]::SetEnvironmentVariable($_.Key, $_.Value, "Machine")
|
|
}
|