-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PSInstalledCatalogPackage being piped to Upgrade-WinGetPackage (#…
…3174) In Update-WinGetPackage, the pipeline can set the PSCatalogPackage can be set by value or property name and the Version by property name. The result of Get-WinGetPackage piped to Update-WinGetPackage results in both properties being set. In this case, the version is not the desired version to update but the installed version. Internally, when we iterate through all the available versions of the catalog package object we will throw InvalidVersionException because well the version is not available... To fix it, I renamed the Version property of the PSInstalledCatalogPackage to InstalledVersion to mimic what the underlying catalog package property actually is. This way the version will not be piped into Update-WinGetPackage but the caller can also specify which one it wants to update giving a better experience.
- Loading branch information
1 parent
9d5cf1c
commit f269007
Showing
4 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters