File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Fixes
6
+
7
+ - Don't log debug messages if ` -Debug ` wasn't set ([ #75 ] ( https://github.com/getsentry/sentry-powershell/pull/75 ) )
8
+
5
9
### Dependencies
6
10
7
11
- Bump Dotnet SDK from v4.12.1 to v4.13.0 ([ #69 ] ( https://github.com/getsentry/sentry-powershell/pull/69 ) )
Original file line number Diff line number Diff line change @@ -53,7 +53,12 @@ class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger
53
53
{
54
54
# Workaround for Windows Powershell issue of halting and asking for user confirmation.
55
55
# see https://github.com/PowerShell/PowerShell/issues/5148
56
- $DebugPreference = ' Continue'
56
+ if ($global :PSVersionTable.PSEdition -eq ' Desktop' ) {
57
+ $pref = Get-Variable DebugPreference
58
+ if ($pref.value -eq " Inquire" ) {
59
+ $DebugPreference = ' Continue'
60
+ }
61
+ }
57
62
58
63
Write-Debug $message
59
64
}
You can’t perform that action at this time.
0 commit comments