Skip to content

vcpkg - prevent crash when duplicate triplets exist in triplets directories#4538

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits intomainfrom
issue-4537
Mar 31, 2026
Merged

vcpkg - prevent crash when duplicate triplets exist in triplets directories#4538
Marc-André Moreau (mamoreau-devolutions) merged 2 commits intomainfrom
issue-4537

Conversation

@GabrielDuf
Copy link
Copy Markdown
Contributor

GetSystemTriplets() concatenates triplets from both triplets/ and triplets/community/, which can produce duplicate names when the same triplet exists in both directories.

ComboboxCard.AddItem uses the triplet name as a dictionary key, causing an ArgumentException crash when navigating to the vcpkg settings page.

Fixed by skipping already-seen triplet names when building the list

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents a crash in the vcpkg settings UI caused by duplicate triplet names when both triplets/ and triplets/community/ contain the same triplet, by de-duplicating triplet names during enumeration.

Changes:

  • Skip adding a triplet name if it has already been added to the returned list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) merged commit 4b82636 into main Mar 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants