microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
489 stars 84 forks source link

Interactive update does not support architecture override #405

Open ryfu-msft opened 1 year ago

ryfu-msft commented 1 year ago

Brief description of your issue

When attempting to perform an interactive update to a package like junnegun.fzf. The architecture for each installer node is being overridden by the architecture that winget-create detects.

Steps to reproduce

wingetcreate update junegunn.fzf -i

Expected behavior

winget-create should preserve the existing architecture or at least allow the user to provide the same architecture override behavior as the autonomous flow.

Actual behavior

Updated manifest becomes invalid because all of the installer architectures are updated to 'x64' causing a duplicate installer error during validation.

Environment

Windows Package Manager Manifest Creator v1.2.7.0
mdanish-kh commented 1 year ago

Actually, this looks more a problem with the current latest manifest (which is 0.42.0 as of typing this message). It seems that the x64 InstallerUrl was mistakenly used for all three architectures in the manifest which is why winget-create is detecting x64 arch for all installer nodes (i opened a PR to fix this in the pkgs repo). If we look at a previous version, say 0.41.0, each node has an arch specific InstallerUrl.

It would be a better UX if winget-create could prompt the user to keep the same arch. Just wanted to clarify this example though

Edit: The URLs were fixed for the manifest, so the issue no longer reproduces for this package. I'll see if I could find some examples where this issue reproduces and update them here