mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 19:39:39 -08:00
parent
a9671df378
commit
4d048b2658
|
@ -34,13 +34,15 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
||||||
$StartInfo.WorkingDirectory = $PWD.ProviderPath
|
$StartInfo.WorkingDirectory = $PWD.ProviderPath
|
||||||
}
|
}
|
||||||
$StartInfo.CreateNoWindow = $true
|
$StartInfo.CreateNoWindow = $true
|
||||||
$Process.Start() | Out-Null
|
[void]$Process.Start()
|
||||||
$Process.WaitForExit() | Out-Null
|
$stdoutTask = $Process.StandardOutput.ReadToEndAsync()
|
||||||
$stderr = $Process.StandardError.ReadToEnd().Trim()
|
$stderrTask = $Process.StandardError.ReadToEndAsync()
|
||||||
|
[void]$Process.WaitForExit()
|
||||||
|
$stderr = $stderrTask.Result.Trim()
|
||||||
if ($stderr -ne '') {
|
if ($stderr -ne '') {
|
||||||
$Host.UI.WriteErrorLine($stderr)
|
$Host.UI.WriteErrorLine($stderr)
|
||||||
}
|
}
|
||||||
return $Process.StandardOutput.ReadToEnd()
|
$stdoutTask.Result
|
||||||
}
|
}
|
||||||
|
|
||||||
function Set-PoshContext {}
|
function Set-PoshContext {}
|
||||||
|
|
Loading…
Reference in a new issue