winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Winget install return code handling & Window management

Open Marterich opened this issue 1 year ago • 0 comments

Fix return code handling :

  • If you had an application installed and clicked install/update again, winget would exit with return code "-1978335189" No applicable update found, which is != 0, and therefore the logic for the fallback installation methods would start.

Changed winget window management:

  • Modified the winget install to utilize the open powershell window rather than create new windows for each install.

Personal opinion: I think the function Install-WinUtilProgramWinget is starting to get a bit out of hand in terms of repetition of code blocks, repetition of the same arguments for winget, and so on. I think that we should rework the function (maybe after the next release when it's clear if the fallback works as expected) and maybe split it up into smaller logic blocks, or multiple functions to remove some of the repeated code and keep the quality of the code up to the standard of the rest of winutil.

Marterich avatar May 22 '24 20:05 Marterich