mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[macOS] Refactor Common.Helpers (#8924)
* [macOS] Refactor Common.Helpers * Update readme file * Remove unnecessary double quotes --------- Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
function Get-JavaVersions {
|
||||
$defaultJavaPath = (Get-Item env:JAVA_HOME).value
|
||||
|
||||
|
||||
$os = Get-OSVersion
|
||||
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
|
||||
$javaVersions = Get-Item env:JAVA_HOME_*_arm64
|
||||
} else {
|
||||
$javaVersions = Get-Item env:JAVA_HOME_*_X64
|
||||
}
|
||||
|
||||
$sortRules = @{
|
||||
Expression = { [Int32]$_.Name.Split("_")[2] }
|
||||
Expression = { [Int32]$_.Name.Split("_")[2] }
|
||||
Descending = $false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user