Skip to content

Commit

Permalink
Merge pull request #406 from skeept/patch-1
Browse files Browse the repository at this point in the history
DefaultRunspace.Debugger.Inbreakpoint check
  • Loading branch information
rkeithhill authored Feb 9, 2017
2 parents 2f92ba6 + 53fd494 commit 5f09094
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/posh-git.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ if ($ForcePoshGitPrompt -or !$currentPromptDef -or ($currentPromptDef -eq $defau
Write-VcsStatus
# If stopped in the debugger, the prompt needs to indicate that in some fashion
$debugMode = (Test-Path Variable:/PSDebugContext) -or [runspace]::DefaultRunspace.Debugger.InBreakpoint
$hasInBreakpoint = [runspace]::DefaultRunspace.Debugger | Get-Member -Name InBreakpoint -MemberType property
$debugMode = (Test-Path Variable:/PSDebugContext) -or ($hasInBreakpoint -and [runspace]::DefaultRunspace.Debugger.InBreakpoint)
$promptSuffix = if ($debugMode) { $GitPromptSettings.DefaultPromptDebugSuffix } else { $GitPromptSettings.DefaultPromptSuffix }
# If user specifies $null or empty string, set to ' ' to avoid "PS>" unexpectedly being displayed
Expand Down

0 comments on commit 5f09094

Please sign in to comment.