Skip to content

Commit

Permalink
Merge pull request #560 from dahlbyk/gh558
Browse files Browse the repository at this point in the history
Add prompt error stacktrace if Debug = $true
  • Loading branch information
dahlbyk authored Apr 16, 2018
2 parents fc692c5 + ff4a62a commit ebb94fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/GitPrompt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ $PoshGitVcsPrompt = {
if ($s) {
Write-Prompt $s.BeforeText -BackgroundColor $s.BeforeBackgroundColor -ForegroundColor $s.BeforeForegroundColor
Write-Prompt "Error: $_" -BackgroundColor $s.ErrorBackgroundColor -ForegroundColor $s.ErrorForegroundColor
if ($s.Debug) {
Write-Host
Write-Verbose "PoshGitVcsPrompt error details: $($_ | Format-List * -Force | Out-String)" -Verbose
}
Write-Prompt $s.AfterText -BackgroundColor $s.AfterBackgroundColor -ForegroundColor $s.AfterForegroundColor
}
}
Expand Down

0 comments on commit ebb94fb

Please sign in to comment.