[ubuntu] Refactor Software Report helpers (#8954)

This commit is contained in:
Shamil Mubarakshin
2023-12-06 13:58:03 +01:00
committed by GitHub
parent b0fc01efc6
commit a9bc069a35
11 changed files with 140 additions and 156 deletions

View File

@@ -2,8 +2,8 @@ using module ./software-report-base/SoftwareReport.psm1
using module ./software-report-base/SoftwareReport.Nodes.psm1
param (
[Parameter(Mandatory)][string]
$OutputDirectory
[Parameter(Mandatory)]
[string] $OutputDirectory
)
$global:ErrorActionPreference = "Stop"
@@ -23,7 +23,7 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableName
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.WebServers.psm1") -DisableNameChecking
# Restore file owner in user profile
Restore-UserOwner
sudo chown -R ${env:USER}: $env:HOME
# Software report
$softwareReport = [SoftwareReport]::new("Ubuntu $(Get-OSVersionShort)")
@@ -164,7 +164,6 @@ $cliTools.AddToolVersion("OpenShift CLI", $(Get-OCCliVersion))
$cliTools.AddToolVersion("ORAS CLI", $(Get-ORASCliVersion))
$cliTools.AddToolVersion("Vercel CLI", $(Get-VerselCliversion))
$installedSoftware.AddHeader("Java").AddTable($(Get-JavaVersionsTable))
$phpTools = $installedSoftware.AddHeader("PHP Tools")