Skip to content

Commit

Permalink
Undo that
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Mar 15, 2024
1 parent d83be5b commit d31294e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,9 @@ foreach ($doc in $docs) {
Write-Host "Modified sample:"
Write-Host -ForegroundColor DarkGray $code
if($code -like "*Write-Error*") {
$ErrorActionPreference = "SilentlyContinue"
Invoke-Expression $code
$ErrorActionPreference = "Stop"
} else {
Invoke-Expression $code
$code = $code -replace "Write-Error", "Write-Host"
}
Invoke-Expression $code
$recording = Stop-SpectreRecording -Title "Example $([int]$example++)"

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

0 comments on commit d31294e

Please sign in to comment.