winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Multi-query - Continue when package not found

Open Trenly opened this issue 2 years ago • 3 comments

Description of the new feature / enhancement

When using a multi-query, if a typo is made in a single package, none of the packages are installed/upgraded and only the warning about "Package not found" is shown

Proposed technical implementation details

Install the packages which are able to be found and show the warning for the ones which aren't able to be found

Trenly avatar Feb 22 '23 04:02 Trenly

After looking at the code, I realize that there is an argument --ignore-unavailable which provides the expected behavior, but is only implemented for the import flow. As a user, I would expect this to be the default, rather than terminating

Trenly avatar Feb 22 '23 22:02 Trenly

We can change the behavior if that makes it more intuitive. My thinking for making it not install anything if there was any package not found was that if it starts installing something, I would assume it's going to install everything and I may leave the machine unattended until it finished. I wouldn't like to come back some time later only to realize that it didn't install some things that it could have told me about immediately and given me a chance to fix it before doing any work.

Adding the --ignore-unavailable to install should just be a matter of adding it to the command's GetArguments().

florelis avatar Feb 23 '23 21:02 florelis

I can see that; Based on the way I see the search flows though, it would be possible to report the "not found" warnings before starting the installs?

Trenly avatar Feb 23 '23 21:02 Trenly