Closed stuartp44 closed 10 months ago
What made you believe that updates are being compared by title?
May I ask for feedback for this? this PR genuinely fixes an issue we have using this and has no effect on dropping updates as they will be installed (if valid) on the next search. For us, on the next search the duplicate update is not there anymore and is actually installed by the first detect and install.
Is this able to be pushed into master now?
Am I sorry. But this is making too many style code changes; what are you using to reformat this?
Anyhow, please, limit the changes to just the part that has the change:
if (($updatesToInstall | Select-Object -ExpandProperty Title) -contains $updateTitle) {
...
Done and resolved the formatting. I use prettier, just had to disable it as it does it without having to save.
Chasing up on this? Are you happy with the changes?
This PR detects when an update is attempted to be installed which equal the same update by its title. We do this by comparing what is currently in the install object, using the update title and skip the update it if we find it already in the object. This stops the HRESULT: 0x80240013 which is, as far as I know, when a duplicate update is attempted to be installed at the same time.
Resolves #131