Update tell-quote.ps1

This commit is contained in:
Markus Fleschutz 2023-08-10 11:35:46 +02:00
parent 344c0a9cc4
commit 74811f7fe6

View File

@ -17,10 +17,8 @@ try {
$randomNumberGenerator = New-Object System.Random
$row = [int]$randomNumberGenerator.next(0, $table.Count - 1)
$quote = $table[$row].QUOTE
$author = $table[$row].AUTHOR
& "$PSScriptRoot/speak-english.ps1" "$quote (by $author)"
& "$PSScriptRoot/speak-english.ps1" "$($table[$row].QUOTE). By $($table[$row].AUTHOR)."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"