From 248a0079327f8daa78b55ac612818a78b5ed2307 Mon Sep 17 00:00:00 2001 From: Kris Borowinski Date: Wed, 3 Dec 2025 08:53:35 +0100 Subject: [PATCH] Fix pandoc version regex and write error exception --- tools/build-updatedhelp.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build-updatedhelp.ps1 b/tools/build-updatedhelp.ps1 index b0f4b9099cb3..0e06e99e8a9c 100644 --- a/tools/build-updatedhelp.ps1 +++ b/tools/build-updatedhelp.ps1 @@ -37,7 +37,7 @@ $docToolsPath = New-Item (Join-Path $tempDir "doctools") -ItemType Directory -Fo $pandoc = Get-Command pandoc.exe -ErrorAction SilentlyContinue if ($pandoc) { - $version = (& $pandoc.Source --version | Select-String -Pattern 'pandoc\.exe').Line.Split(' ')[-1] + $version = (& $pandoc.Source --version | Select-String -Pattern 'pandoc(\.exe|\s)').Line.Split(' ')[-1] if ($version -ge $panDocVersion) { Write-Host "Found Pandoc version $version." $pandocExePath = $pandoc.Source @@ -165,7 +165,7 @@ Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process { if ($cabInfo.Count -eq 8) { $cabInfo[-1].FullName } } catch { - Write-Error -Message "PlatyPS failure: $ModuleName -- $Version" -Exception $_ + Write-Error -Message "PlatyPS failure: $ModuleName -- $Version" -Exception $_.Exception } }