microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

Add an option to exclude apps from major/minor updates #4894

Closed FaserF closed 1 month ago

FaserF commented 1 month ago

Description of the new feature / enhancement

We have some applications where we cannot update the applications without validating them first. But we would like to get patch updates (1.0.2 : 1=Major, 0=Minor, 2=Patch) for security reasons f.e.

I would love to see an option for this, similar to winget pin add Tried implementing this in another way, but having it directly at winget would be great. https://github.com/Romanitho/Winget-AutoUpdate/pull/711

Proposed technical implementation details

Extend for example the current pin option with these parameters:

winget pin add Company.AppName --PatchOnly

for example

mdanish-kh commented 1 month ago

Have you tried setting a gating pin? For your use case, I believe the following command will do

winget pin add Company.AppName --version 1.0.*
FaserF commented 1 month ago

Thats a great input, let me check that. I think this will solve it :) Thanks!