mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 02:20:20 +08:00
[MacOS] Move preinstalled java distributions to the toolcache directory (#2883)
* Move java to the toolcache * resolved comments * added sudo for ln command * fixed versions and added symlink * fixed openjdk.sh * fixed typo * updated SoftwareReport * fixed SoftwareReport * fixed SoftwareReport * fixed tool name Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
@@ -35,15 +35,7 @@ Describe "Java" {
|
||||
"/usr/libexec/java_home -v${Version}" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
if ($_.Title -ne "Default") {
|
||||
It "Version is valid" -TestCases $_ {
|
||||
$javaRootPath = "/Library/Java/JavaVirtualMachines/adoptopenjdk-${Title}.jdk/Contents/Home"
|
||||
$javaBinPath = Join-Path $javaRootPath "/bin/java"
|
||||
Validate-JavaVersion -JavaCommand "$javaBinPath -version" -ExpectedVersion $Version
|
||||
}
|
||||
}
|
||||
|
||||
It "<EnvVariable>" -TestCases $_ {
|
||||
It "Java <Version>" -TestCases $_ {
|
||||
$envVariablePath = Get-EnvironmentVariable $EnvVariable
|
||||
$javaBinPath = Join-Path $envVariablePath "/bin/java"
|
||||
Validate-JavaVersion -JavaCommand "$javaBinPath -version" -ExpectedVersion $Version
|
||||
|
||||
Reference in New Issue
Block a user