[Windows] Stop SoftwareReport script if error (#4801)

* Stop SoftwareReport script if error

* Validate blank versions

* Fix tables parsing
This commit is contained in:
Aleksandr Chebotov
2021-12-24 10:58:19 +03:00
committed by GitHub
parent d4793cf476
commit 7518d04a3a
4 changed files with 66 additions and 14 deletions

View File

@@ -1,3 +1,8 @@
$global:ErrorActionPreference = "Stop"
$global:ProgressPreference = "SilentlyContinue"
$ErrorView = "NormalView"
Set-StrictMode -Version Latest
Import-Module MarkdownPS
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
@@ -294,4 +299,5 @@ if ($cachedImages) {
$markdown += $cachedImages | New-MDTable
}
Test-BlankElement -Markdown $markdown
$markdown | Out-File -FilePath "C:\InstalledSoftware.md"