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

Only Enumerate Existing Triplet Directories #3088

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

mrixner
Copy link
Contributor

@mrixner mrixner commented Dec 19, 2024

  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.

If the vcpkg root was set to an empty directory (or rather a directory without a triplets directory inside it), Vcpkg.GetSystemTriplets() would fail, as it would attempt to enumerate a directory that didn't exist, causing vcpkg source retrieval to not work and (the much bigger problem of) the settings page not loading. This pull request fixes that by only enumerating existing directories.

I'm sorry; this was my bad. I assumed Directory.EnumerateFiles() would return an empty array if the directory didn't exist, not throw an error.


related to #3085

@marticliment
Copy link
Owner

I am going to merge the PR but not close the issue, as I want to make sure that a random exception does not block settings from loading.

@marticliment marticliment merged commit 2be4b5b into marticliment:main Dec 19, 2024
2 checks passed
@mrixner mrixner deleted the fix-inaccessible-settings branch December 19, 2024 22:21
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