Skip to content

Commit

Permalink
Suppress error in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Mar 14, 2024
1 parent b023ef2 commit 4e9f033
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ foreach ($doc in $docs) {
}
Write-Host "Modified sample:"
Write-Host -ForegroundColor DarkGray $code
Invoke-Expression $code
try {
Invoke-Expression $code
} catch {
Write-Warning "Error generating sample: $_"
}
$recording = Stop-SpectreRecording -Title "Example $([int]$example++)"

$castName = ($doc.Name -replace '.md$', '' -replace '-', '').ToLower() + "Example$example"
Expand Down

0 comments on commit 4e9f033

Please sign in to comment.