Скажите PowerShell ISE, чтобы он не отправлял stderr в Write-Error

Консоль PowerShell и PowerShell ISE ведут себя по-разному, когда исполняемые файлы записывают в стандартный поток ошибок (stderr). Консоль (powershell.exe) отображает его как стандартный вывод. Например, когда я получаю статус с Mercurial в не репозитории, он пишет в стандартную ошибку:

> hg st -R C:\Windows
abort: repository C:\Windows not found!

Однако в PowerShell ISE (powershell_ise.exe) эта ошибка передается в PowerShellWrite-Error командлет:

> hg st -R C:\Windows
hg.exe : abort: repository C:\Windows not found!
At line:1 char:3
+ hg <<<<  st -R C:\Windows
    + CategoryInfo          : NotSpecified: (abort: repository C:\Windows not found!:String) [], RemoteExcepti 
   on
    + FullyQualifiedErrorId : NativeCommandError

Is there any way to configure the ISE to behave like the console, and not send the stderr stream to Write-Error?

Ответы на вопрос(2)

Ваш ответ на вопрос