Skip to content

Commit

Permalink
fix bool switch
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Nov 5, 2023
1 parent 33733db commit 36b34a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/Get-DbatoolsConfigValue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function Get-DbatoolsConfigValue {
if ($null -eq $temp) { $temp = $Fallback }

# Prevent some potential [switch] parse issues
if ($temp -eq "Mandatory") { $temp = $true }
if ($temp -eq "Optional") { $temp = $false }
if ($temp.ToString() -eq "Mandatory") { $temp = $true }
if ($temp.ToString() -eq "Optional") { $temp = $false }

if ($NotNull -and ($null -eq $temp)) {
Stop-Function -Message "No Configuration Value available for $Name" -EnableException $true -Category InvalidData -Target $FullName
Expand Down

0 comments on commit 36b34a0

Please sign in to comment.