Skip to content

Commit

Permalink
Fix installed package version checks (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom authored Feb 6, 2022
1 parent 584769d commit 916022a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

## 0.0.6 - 2022-02-06 - Force dependency checks
### Fixed
* Installed package version checks

## 0.0.5 - 2022-01-13 - Force dependency checks
### Fixed
* PowerShellGet dependency checks
Expand Down
2 changes: 1 addition & 1 deletion src/WinGet.psd1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
RootModule = 'WinGet.psm1'
ModuleVersion = '0.0.5'
ModuleVersion = '0.0.6'
GUID = '468ef37a-2557-4c10-92ec-783ec1e41639'
Author = 'Ethan Bergstrom'
Copyright = ''
Expand Down
2 changes: 1 addition & 1 deletion src/public/Get-InstalledPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ function Get-InstalledPackage {
# Convert the PSCustomObject output from Cobalt into PackageManagement SWIDs, then filter results by version requirements
# This provides wildcard search behavior for locally installed packages, which WinGet lacks
Cobalt\Get-WinGetPackage | ConvertTo-SoftwareIdentity |
Where-Object {-Not $Name -Or ($_.Name -Like $Name)}
Where-Object {-Not $Name -Or ($_.Name -Like $Name)} |
Where-Object {Test-PackageVersion -Package $_ -RequiredVersion $RequiredVersion -MinimumVersion $MinimumVersion -MaximumVersion $MaximumVersion}
}

0 comments on commit 916022a

Please sign in to comment.