RamblingCookieMonster / PSDepend

PowerShell Dependency Handler
MIT License
285 stars 76 forks source link

Added capability to remove existing conflicting module versions to PSGalleryModule #108

Closed aromano2 closed 2 years ago

aromano2 commented 4 years ago

Resolves #107
Added a 'Clean' switch to PSGalleryModule. When specified via parameters: @{ PSDependOptions = @{ Target = 'C:\temp' }

Pester = @{
    DependencyType = 'PSGalleryModule'
    Name = 'Pester'
    Parameters = @{ Clean = $true }
    Version = '4.8.0'
    AddToPath = 'C:\temp'
}

}

the script will clean out any existing versions of the same module, located within any of the paths defined in $env:PSModulePath. Had to refactor a good amount of the code to accommodate this feature.

aromano2 commented 4 years ago

bump @RamblingCookieMonster