diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index 160565588fde..4f19089a5cd2 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -44,9 +44,9 @@ if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { $languageAndRuntime.AddToolVersion("Go", $(Get-GoVersion)) } $languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion)) +$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion)) if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) { $languageAndRuntime.AddToolVersion("MSBuild", $(Get-MSBuildVersion)) - $languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion)) $languageAndRuntime.AddToolVersion("NVM", $(Get-NVMVersion)) $languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+') } @@ -211,11 +211,9 @@ $browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable)) $java = $installedSoftware.AddHeader("Java") $java.AddTable($(Get-JavaVersions)) -if (-not $os.IsVenturaArm64) { - # Toolcache - $toolcache = $installedSoftware.AddHeader("Cached Tools") - $toolcache.AddNodes($(Build-ToolcacheSection)) -} +# Toolcache +$toolcache = $installedSoftware.AddHeader("Cached Tools") +$toolcache.AddNodes($(Build-ToolcacheSection)) # Rust $rust = $installedSoftware.AddHeader("Rust Tools") diff --git a/images/macos/software-report/SoftwareReport.Toolcache.psm1 b/images/macos/software-report/SoftwareReport.Toolcache.psm1 index a7296b203e2f..0878024cbf4d 100644 --- a/images/macos/software-report/SoftwareReport.Toolcache.psm1 +++ b/images/macos/software-report/SoftwareReport.Toolcache.psm1 @@ -33,14 +33,24 @@ function Get-ToolcacheGoVersions { return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } } -function Build-ToolcacheSection { - return @( - [ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List"), - [ToolVersionsListNode]::new("Python", $(Get-ToolcachePythonVersions), '^\d+\.\d+', "List"), - [ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List"), +function Build-ToolcacheSection { + + $nodes = @() + + if (-not $os.IsVenturaArm64) { + $nodes += @( + [ToolVersionsListNode]::new("Ruby", $(Get-ToolcacheRubyVersions), '^\d+\.\d+', "List"), + [ToolVersionsListNode]::new("PyPy", $(Get-ToolcachePyPyVersions), '^\d+\.\d+', "List") + ) + } + + $nodes += @( + [ToolVersionsListNode]::new("Python", $(Get-ToolcachePythonVersions), '^\d+\.\d+', "List"), [ToolVersionsListNode]::new("Node.js", $(Get-ToolcacheNodeVersions), '^\d+', "List"), [ToolVersionsListNode]::new("Go", $(Get-ToolcacheGoVersions), '^\d+\.\d+', "List") ) + + return $nodes } function Get-PowerShellModules { @@ -50,4 +60,4 @@ function Get-PowerShellModules { $moduleVersions = Get-Module -Name $moduleName -ListAvailable | Select-Object -ExpandProperty Version | Sort-Object -Unique return [ToolVersionsListNode]::new($moduleName, $moduleVersions, '^\d+', "Inline") } -} \ No newline at end of file +}