fix: fix lastexitcode

This commit is contained in:
TravisTX 2020-12-30 07:49:08 -07:00 committed by Jan De Dobbeleer
parent c9075268ad
commit 23eb73cd69
2 changed files with 2 additions and 2 deletions

View file

@ -92,11 +92,11 @@ function Set-PoshPrompt {
$standardOut = $process.StandardOutput.ReadToEnd()
$process.WaitForExit()
$standardOut
Set-GitStatus
$global:LASTEXITCODE = $realLASTEXITCODE
#remove temp variables
Remove-Variable realLASTEXITCODE -Confirm:$false
Remove-Variable lastCommandSuccess -Confirm:$false
Set-GitStatus
}
Set-Item -Path Function:prompt -Value $Prompt -Force
}

View file

@ -56,10 +56,10 @@ function Set-GitStatus {
$standardOut = $process.StandardOutput.ReadToEnd()
$process.WaitForExit()
$standardOut
Set-GitStatus
$global:LASTEXITCODE = $realLASTEXITCODE
#remove temp variables
Remove-Variable realLASTEXITCODE -Confirm:$false
Remove-Variable lastCommandSuccess -Confirm:$false
Set-GitStatus
}
Set-Item -Path Function:prompt -Value $Prompt -Force