Skip to content

Commit

Permalink
Corrected reversed logic in `if (-not $Purge)
Browse files Browse the repository at this point in the history
Using `$Purge.IsPresent` to be more explicit.
  • Loading branch information
jrdnr committed Mar 22, 2019
1 parent 23b2ad8 commit 548cd0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DSCResources/cChocoPackageInstall/cChocoPackageInstall.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ function Get-ChocoInstalledPackage {
}
$ChocoInstallList = Join-Path -Path $ChocoInstallLP -ChildPath 'ChocoInstalled.xml'

if ($Purge) {
if ($Purge.IsPresent) {
Remove-Item $ChocoInstallList -Force
$res = $true
} else {
Expand Down Expand Up @@ -464,7 +464,7 @@ function Get-ChocoVersion {
}
$chocoVersion = Join-Path -Path $chocoInstallCache -ChildPath 'ChocoVersion.xml'

if ( -not $Purge) {
if ($Purge.IsPresent) {
Remove-Item $chocoVersion -Force
$res = $true
} else {
Expand Down

0 comments on commit 548cd0c

Please sign in to comment.