Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- Windows-Powershell logged debug messages even though -Debug wasn't set ([#75](https://github.com/getsentry/sentry-powershell/pull/75))

### Dependencies

- Bump Dotnet SDK from v4.12.1 to v4.13.0 ([#69](https://github.com/getsentry/sentry-powershell/pull/69))
Expand Down
7 changes: 6 additions & 1 deletion modules/Sentry/private/DiagnosticLogger.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger
{
# Workaround for Windows Powershell issue of halting and asking for user confirmation.
# see https://github.com/PowerShell/PowerShell/issues/5148
$DebugPreference = 'Continue'
if ($global:PSVersionTable.PSEdition -eq 'Desktop') {
$pref = Get-Variable DebugPreference
if ($pref.value -eq "Inquire") {
$DebugPreference = 'Continue'
}
}

Write-Debug $message
}
Expand Down
Loading