Skip to content

Commit 9a9a185

Browse files
Alexey-AyupovAlexey Ayupov
andauthored
[macOS] add node to software report macOS 13 arm64 (#8603)
Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
1 parent 10d8554 commit 9a9a185

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

images/macos/software-report/SoftwareReport.Generator.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) {
4444
$languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion))
4545
}
4646
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
47+
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
4748
if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) {
4849
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion))
49-
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
5050
$languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion))
5151
$languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+')
5252
}
@@ -211,11 +211,9 @@ $browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
211211
$java = $installedSoftware.AddHeader("Java")
212212
$java.AddTable($(Get-JavaVersions))
213213

214-
if (-not $os.IsVenturaArm64) {
215-
# Toolcache
216-
$toolcache = $installedSoftware.AddHeader("Cached Tools")
217-
$toolcache.AddNodes($(Build-ToolcacheSection))
218-
}
214+
# Toolcache
215+
$toolcache = $installedSoftware.AddHeader("Cached Tools")
216+
$toolcache.AddNodes($(Build-ToolcacheSection))
219217

220218
# Rust
221219
$rust = $installedSoftware.AddHeader("Rust Tools")

images/macos/software-report/SoftwareReport.Toolcache.psm1

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ function Get-ToolcacheGoVersions {
3333
return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
3434
}
3535

36-
function Build-ToolcacheSection {
37-
return @(
38-
[ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List"),
39-
[ToolVersionsListNode]::new("Python", $(Get-ToolcachePythonVersions), '^\d+\.\d+', "List"),
40-
[ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List"),
36+
function Build-ToolcacheSection {
37+
38+
$nodes = @()
39+
40+
if (-not $os.IsVenturaArm64) {
41+
$nodes += @(
42+
[ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List"),
43+
[ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List")
44+
)
45+
}
46+
47+
$nodes += @(
48+
[ToolVersionsListNode]::new("Python", $(Get-ToolcachePythonVersions), '^\d+\.\d+', "List"),
4149
[ToolVersionsListNode]::new("Node.js", $(Get-ToolcacheNodeVersions), '^\d+', "List"),
4250
[ToolVersionsListNode]::new("Go", $(Get-ToolcacheGoVersions), '^\d+\.\d+', "List")
4351
)
52+
53+
return $nodes
4454
}
4555

4656
function Get-PowerShellModules {
@@ -50,4 +60,4 @@ function Get-PowerShellModules {
5060
$moduleVersions = Get-Module -Name $moduleName -ListAvailable | Select-Object -ExpandProperty Version | Sort-Object -Unique
5161
return [ToolVersionsListNode]::new($moduleName, $moduleVersions, '^\d+', "Inline")
5262
}
53-
}
63+
}

0 commit comments

Comments
 (0)