Skip to content

Commit a85dec2

Browse files
authored
Fix pandoc version regex and write error exception (#12559)
1 parent dc9cce9 commit a85dec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/build-updatedhelp.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $docToolsPath = New-Item (Join-Path $tempDir "doctools") -ItemType Directory -Fo
3737

3838
$pandoc = Get-Command pandoc.exe -ErrorAction SilentlyContinue
3939
if ($pandoc) {
40-
$version = (& $pandoc.Source --version | Select-String -Pattern 'pandoc\.exe').Line.Split(' ')[-1]
40+
$version = (& $pandoc.Source --version | Select-String -Pattern 'pandoc(\.exe|\s)').Line.Split(' ')[-1]
4141
if ($version -ge $panDocVersion) {
4242
Write-Host "Found Pandoc version $version."
4343
$pandocExePath = $pandoc.Source
@@ -165,7 +165,7 @@ Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process {
165165
if ($cabInfo.Count -eq 8) { $cabInfo[-1].FullName }
166166
}
167167
catch {
168-
Write-Error -Message "PlatyPS failure: $ModuleName -- $Version" -Exception $_
168+
Write-Error -Message "PlatyPS failure: $ModuleName -- $Version" -Exception $_.Exception
169169
}
170170
}
171171

0 commit comments

Comments
 (0)