Closed SomeKindOfGeek closed 3 weeks ago
You are using a very old version of the PSReadLine module (shipped in-box with PowerShell) and the issue should've been fixed in newer versions. Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery. See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.
Prerequisites
Exception report
Screenshot
n/a
Environment data
Steps to reproduce
function hello { clear-Host $y = get-random -Minimum 6 -Maximum 15 $x = $number = get-random -Minimum 6 -Maximum 15 $product = $x * $y
Write-Host "SECURITY BREACH DECTECTED" ForegroundColor -Red start-sleep -seconds 1
$userInput = int -ForegroundColor -Blue start-sleep -seconds 0.5 write-host "3..." ForegroundColor -Green start-sleep -seconds 0.5 write-host "2..." ForegroundColor -Green start-sleep -seconds 0.5 write-host "1..." ForegroundColor -Green
if ($userInput -eq $product) { clear-host Write-Host "FALSE ALARM" -ForegroundColor -Green start-sleep -seconds 0.7 write-host "LOCKDOWN DEACTIVATING" -ForegroundColor -Green
} else { clear-host write-host "Hello, I am Justin Treudo. I SEE YOU..." -ForegroundColor -Blue start-sleep -seconds 3 write-host "RUN... >:)" -ForegroundColor -Red } } hello
Expected behavior
It should just give you an error message
Actual behavior
It gives me an error message, and I am unable to edit the code