mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -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
|
$StartInfo.CreateNoWindow = $true
|
||||||
$_ = $Process.Start();
|
$_ = $Process.Start();
|
||||||
$_ = $Process.WaitForExit();
|
$_ = $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"
|
$env:POWERLINE_COMMAND = "oh-my-posh"
|
||||||
|
|
Loading…
Reference in a new issue