I have an installer that calls Invoke-WebRequest
and then shortly after calls sudo <command>
, but the line is all filled up with output from the WebRequest.
From Terminal:
pwsh
Then, from PowerShell:
Invoke-WebRequest https://google.com -OutFile /dev/null; sudo ls -al
How do I make sure the password prompt is visible on its own line? I prefer to not call Clear-Host
, since I would like to retain output from previous commands on the screen for the user to read.
This issue is present on PowerShell for macOS and Linux, but not for Windows, since Windows' own PowerShell tends to show the progress indicator at the top of the window.