mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[windows] Add dynamic path for Get-ToolsetContent (#9147)
* [windows] Add dynamic path for Get-ToolsetContent * Add missing variable in win22 template
This commit is contained in:
committed by
GitHub
parent
cb77fa2a64
commit
ebef5f5fee
@@ -217,11 +217,11 @@ function Get-ToolsetContent {
|
||||
Retrieves the content of the toolset.json file.
|
||||
|
||||
.DESCRIPTION
|
||||
This function reads the toolset.json file located at "C:\image\toolset.json"
|
||||
and returns the content as a PowerShell object.
|
||||
This function reads the toolset.json file in path provided by IMAGE_FOLDER
|
||||
environment variable and returns the content as a PowerShell object.
|
||||
#>
|
||||
|
||||
$toolsetPath = Join-Path "C:\\image" "toolset.json"
|
||||
$toolsetPath = Join-Path $env:IMAGE_FOLDER "toolset.json"
|
||||
$toolsetJson = Get-Content -Path $toolsetPath -Raw
|
||||
ConvertFrom-Json -InputObject $toolsetJson
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user