mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Set AGENT_TOOLSDIRECTORY in packer template (#2457)
* Set AGENT_TOOLSDIRECTORY in packer template This was set in the ruby installer but it is referenced elsewhere so I believe it makes the most sense to have this set centrally in the packer template to be referenced across multiple scripts. * Fix typo * Capitalize env var in ws2016 template for consistency * Set AGENT_TOOLSDIRECTORY in Initialize-VM.ps1 * Add missing env var for AGENT_TOOLSDIRECTORY in step in ws2016 template
This commit is contained in:
@@ -98,11 +98,6 @@ function Set-DefaultRubyVersion
|
||||
Add-MachinePathItem -PathItem $rubyDir | Out-Null
|
||||
}
|
||||
|
||||
# Define AGENT_TOOLSDIRECTORY environment variable
|
||||
$toolsDirectory = "C:/hostedtoolcache/windows"
|
||||
$env:AGENT_TOOLSDIRECTORY = $toolsDirectory
|
||||
setx AGENT_TOOLSDIRECTORY $toolsDirectory /M
|
||||
|
||||
# Install Ruby
|
||||
$rubyTools = (Get-ToolsetContent).toolcache | Where-Object { $_.name -eq "Ruby" }
|
||||
$rubyToolVersions = $rubyTools.versions
|
||||
|
||||
Reference in New Issue
Block a user