Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update regex for finding architecture from URL #551

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Aug 21, 2024

With how the current logic for matching arch from URL works, an x86_x64 type pattern would always match both x64 and x86 and fail to get a unique match. This PR updates the pattern matching to only check for x86 if it doesn't match an x86_64 or similar pattern

Issue can be repro with an example manifest:

wingetcreate update version-fox.vfox --version 1.0.0  --urls https://github.com/version-fox/vfox/releases/download/v0.5.4/vfox_0.5.4_windows_setup_i386.exe https://github.com/version-fox/vfox/releases/download/v0.5.4/vfox_0.5.4_windows_setup_x86_64.exe https://github.com/version-fox/vfox/releases/download/v0.5.4/vfox_0.5.4_windows_setup_aarch64.exe

If you run it with interactive update, it will result in a manifest with duplicate architectures.


@mdanish-kh mdanish-kh requested a review from a team as a code owner August 21, 2024 19:18
@mdanish-kh mdanish-kh requested review from yao-msft and ryfu-msft and removed request for a team August 21, 2024 19:18
@ryfu-msft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft ryfu-msft merged commit 4a7e642 into microsoft:main Aug 23, 2024
3 of 5 checks passed
@mdanish-kh mdanish-kh deleted the regex branch August 23, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants