mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 12:29:40 -08:00
fix: fix lastexitcode
This commit is contained in:
parent
c9075268ad
commit
23eb73cd69
|
@ -92,11 +92,11 @@ function Set-PoshPrompt {
|
||||||
$standardOut = $process.StandardOutput.ReadToEnd()
|
$standardOut = $process.StandardOutput.ReadToEnd()
|
||||||
$process.WaitForExit()
|
$process.WaitForExit()
|
||||||
$standardOut
|
$standardOut
|
||||||
|
Set-GitStatus
|
||||||
$global:LASTEXITCODE = $realLASTEXITCODE
|
$global:LASTEXITCODE = $realLASTEXITCODE
|
||||||
#remove temp variables
|
#remove temp variables
|
||||||
Remove-Variable realLASTEXITCODE -Confirm:$false
|
Remove-Variable realLASTEXITCODE -Confirm:$false
|
||||||
Remove-Variable lastCommandSuccess -Confirm:$false
|
Remove-Variable lastCommandSuccess -Confirm:$false
|
||||||
Set-GitStatus
|
|
||||||
}
|
}
|
||||||
Set-Item -Path Function:prompt -Value $Prompt -Force
|
Set-Item -Path Function:prompt -Value $Prompt -Force
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,10 +56,10 @@ function Set-GitStatus {
|
||||||
$standardOut = $process.StandardOutput.ReadToEnd()
|
$standardOut = $process.StandardOutput.ReadToEnd()
|
||||||
$process.WaitForExit()
|
$process.WaitForExit()
|
||||||
$standardOut
|
$standardOut
|
||||||
|
Set-GitStatus
|
||||||
$global:LASTEXITCODE = $realLASTEXITCODE
|
$global:LASTEXITCODE = $realLASTEXITCODE
|
||||||
#remove temp variables
|
#remove temp variables
|
||||||
Remove-Variable realLASTEXITCODE -Confirm:$false
|
Remove-Variable realLASTEXITCODE -Confirm:$false
|
||||||
Remove-Variable lastCommandSuccess -Confirm:$false
|
Remove-Variable lastCommandSuccess -Confirm:$false
|
||||||
Set-GitStatus
|
|
||||||
}
|
}
|
||||||
Set-Item -Path Function:prompt -Value $Prompt -Force
|
Set-Item -Path Function:prompt -Value $Prompt -Force
|
||||||
|
|
Loading…
Reference in a new issue