Skip to content

Commit

Permalink
Merge pull request #1180 from ruandersMSFT/master-1179
Browse files Browse the repository at this point in the history
#1179 [skip ci]
  • Loading branch information
ykuijs authored Mar 5, 2020
2 parents c8d1879 + 7cc690d commit 9d26732
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- SPFarmSolution
- Corrected bug running Solution Job wait for an Absent solution.
- Corrected bug trying to remove an already Absent solution.

## [3.8.0] - 2020-02-27

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,16 @@ function Set-TargetResource
}
}

Wait-SPDscSolutionJob -SolutionName $Name -InstallAccount $InstallAccount
if ($Ensure -eq "Present")
{
Write-Verbose -Message "Waiting for farm solution '$Name' job"
Wait-SPDscSolutionJob -SolutionName $Name -InstallAccount $InstallAccount
}

if ($Ensure -eq "Absent")
if ($Ensure -eq "Absent" -and $CurrentValues.Ensure -ne "Absent")
{
Write-Verbose -Message "Removing farm solution '$Name'"

$result = Invoke-SPDscCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
Expand Down

0 comments on commit 9d26732

Please sign in to comment.