mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 13:36:39 +01:00
Update tell-quote.ps1
This commit is contained in:
parent
344c0a9cc4
commit
74811f7fe6
@ -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])"
|
||||
|
Loading…
Reference in New Issue
Block a user