mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
refactor(pwsh): print stderr separately
This commit is contained in:
parent
d77e824585
commit
61897b78ef
|
@ -15,7 +15,11 @@ function global:Start-Utf8Process
|
|||
$StartInfo.CreateNoWindow = $true
|
||||
$_ = $Process.Start();
|
||||
$_ = $Process.WaitForExit();
|
||||
return $Process.StandardOutput.ReadToEnd() + $Process.StandardError.ReadToEnd()
|
||||
$stderr = $Process.StandardError.ReadToEnd().Trim()
|
||||
if ($stderr -ne '') {
|
||||
$Host.UI.WriteErrorLine($stderr)
|
||||
}
|
||||
return $Process.StandardOutput.ReadToEnd().Trim()
|
||||
}
|
||||
|
||||
$env:POWERLINE_COMMAND = "oh-my-posh"
|
||||
|
|
Loading…
Reference in a new issue