-
Notifications
You must be signed in to change notification settings - Fork 47
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
locate_tools: Search all VS installations for vcvarsall.bat #487
locate_tools: Search all VS installations for vcvarsall.bat #487
Conversation
Adds a new function, FindAllWithVsWhere which functions the same as FindWithVsWhere, but returns a list of all paths found, rather than the first path only. Updates QueryVcVariables to use FindAllWithVsWhere, and loops through each path found, attempting to locate the vcvarsall.bat file. It will use the first one found; if none are found, it will print an error and raise an exception.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #487 +/- ##
==========================================
- Coverage 81.20% 81.18% -0.02%
==========================================
Files 57 57
Lines 7363 7372 +9
==========================================
+ Hits 5979 5985 +6
- Misses 1384 1387 +3 ☔ View full report in Codecov by Sentry. |
…und. FindAllWithVsWhere will return the list sorted from newest to oldest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the changes related to sorting and guaranteeing the order. Overall looks good.
I've added the |
Adds a new function, FindAllWithVsWhere which functions the same as FindWithVsWhere, but returns a list of all paths found, rather than the first path only.
Updates QueryVcVariables to use FindAllWithVsWhere, and loops through each path found, attempting to locate the vcvarsall.bat file. It will use the first one found; if none are found, it will print an error and raise an exception.
Testing
Installed multiple instances of VS tools and verified FindAllWithVsWhere produces paths for both. Removed vcvarsall.bat from one installation and verified that it was found in the second installation. Then removed vcvarsall.bat from both installations and verified the error message printed as expected.
Closes #486