Skip to content

Commit

Permalink
Merge pull request #136 from bozho/issue-135-upgrade-source
Browse files Browse the repository at this point in the history
[#135] A fix for passing custom source name in cChocoPackageInstaller…
  • Loading branch information
pauby authored Feb 26, 2020
2 parents aed5976 + 5b3ceef commit e963174
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DSCResources/cChocoPackageInstall/cChocoPackageInstall.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ function Test-TargetResource
Write-Verbose -Message "Checking if $Name is installed"

if ($AutoUpgrade -and $isInstalled) {
$testParams = @{
pName = $Name
}
if ($Source){
[string]$pSource = "-pSource `"$Source`""
$testParams.pSource = $Source
}
$result = Test-LatestVersionInstalled -pName $Name $pSource
$result = Test-LatestVersionInstalled @testParams
} else {
$result = $isInstalled
}
Expand Down

0 comments on commit e963174

Please sign in to comment.