mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
[Ubuntu] Remove hardcoded toolsToInstall from script (#3701)
This commit is contained in:
@@ -28,9 +28,8 @@ $ErrorActionPreference = "Stop"
|
|||||||
|
|
||||||
# Get toolset content
|
# Get toolset content
|
||||||
$toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw
|
$toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw
|
||||||
$toolsToInstall = @("Python", "Node", "Go")
|
|
||||||
|
|
||||||
$tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache | Where-Object {$ToolsToInstall -contains $_.Name}
|
$tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache | Where-Object {$_.url -ne $null }
|
||||||
|
|
||||||
foreach ($tool in $tools) {
|
foreach ($tool in $tools) {
|
||||||
# Get versions manifest for current tool
|
# Get versions manifest for current tool
|
||||||
@@ -51,8 +50,5 @@ foreach ($tool in $tools) {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/$tool
|
||||||
}
|
}
|
||||||
|
|
||||||
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
|
|
||||||
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/node
|
|
||||||
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/go
|
|
||||||
Reference in New Issue
Block a user