You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the flow confusing in case of Root level and Installer level ARP defined side-by-side. I was testing with a manifest where I had 3 installers and 2 had Installer level ARP and then I defined a root level ARP for testing.
The Root level ARP was considered for the installer with no ARP entry, but rest of the installers had old variables set to their own respective installer level ARP entries. After the update, the root level ARP was shifted to the installer that originally had no ARP entry.
I believe (and this is how wingetcreate does it as well) that Installer level fields (not just limited to ARP entries) should be overwritten by Root level fields at the beginning of the update. This means if Root and installer level ARP are defined side-by-side in the manifest, then this should be considered an inconsistency, and the root level ARP should take precedence and overwrite whatever is at the Installer level.
I would say we can leave this in this PR since the implementation isn't strictly related to ARP, but is applicable to all installer fields. Just wanted to call this out here though.
For reference, I was testing this with Coder.Coder version 2.4.0 with the following installer manifest:
If the behavior of wingetcreate is truly as @mdanish-kh described, then it is likely an error. Items at the installer level take precedence over items at the root level in winget-cli.
The flow would ideally be (and how YamlCreate does it) :
Try to move root level items to installer level. If installer level does not exist, root can be applied successfully. If installer level exists, it overrides root level and root is not applied.
The text was updated successfully, but these errors were encountered:
Originally posted by @mdanish-kh in microsoft/winget-pkgs#129471 (comment)
If the behavior of wingetcreate is truly as @mdanish-kh described, then it is likely an error. Items at the installer level take precedence over items at the root level in winget-cli.
The flow would ideally be (and how YamlCreate does it) :
Try to move root level items to installer level. If installer level does not exist, root can be applied successfully. If installer level exists, it overrides root level and root is not applied.
The text was updated successfully, but these errors were encountered: