[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 <[email protected]>
This commit is contained in:
co-authored by
Nikita Bykov
parent
758e6ef267
commit
ef6e8c905f
@@ -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