[Bug]: Brackets not a valid delimiter around an architecture in a URL
vikingnope opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
What happened?
When doing Komac new
and adding 2 or more installer links, the program decides to give them both or all the same architecture 'x86', could we either have it so that we tell the program what architecture it is, or it detects it automatically?
Komac does detect architectures automatically but sometimes installers incorrectly record what architecture they are so Komac has fallback mechanisms.
Could you possibly provide what URLs you used so I can take a look at the installers?
https://epa.gov/system/files/other-files/2023-08/swmm524(x86)_setup.exe
https://epa.gov/system/files/other-files/2023-08/swmm524(x64)_setup.exe
As you can see here with the first commit they were the same architecture: microsoft/winget-pkgs@becb8e6
After I had to do another commit to fix that: microsoft/winget-pkgs@1eb5c0d
Thanks for providing the URLs. Komac finds architectures in URLs by first looking for a known architecture (E.g. x64) surrounded by delimiters. It does this because otherwise it would identify apps like ArmCord as always being the arm
architecture.
In this case, brackets weren't in the delimiters it looks for so it checks what architecture the exe says it is, which is x86 (All Inno installers do). I've fixed this by adding brackets as delimiters to look for in a URL.
Thanks a lot