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

Fix regression on windows: Env var names are case insensitive #1501

Merged

Conversation

autoantwort
Copy link
Contributor

@autoantwort autoantwort commented Sep 27, 2024

Fixes microsoft/vcpkg#41199

Thank you @tmp64 for identifying why the problem exists :)

The old code was also case insensitive, because get_environment_variable is case insensitive

@@ -661,8 +661,9 @@ namespace vcpkg
{
auto pos = env_var.find('=');
auto key = env_var.substr(0, pos);
if (Util::Sets::contains(env_strings, key) ||
Util::any_of(env_prefix_string, [&](auto&& group) { return Strings::starts_with(key, group); }))
if (Util::Sets::contains(env_strings, key) || Util::any_of(env_prefix_string, [&](auto&& group) {
Copy link

Choose a reason for hiding this comment

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

Is Util::Sets::contains case-insensitive? SystemRoot is in env_strings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. It too late for me 😅 Will fix that :)

@BillyONeal
Copy link
Member

Since this blew up in an important way, can you add a test?

@bschwind bschwind mentioned this pull request Sep 28, 2024
3 tasks
@Neumann-A
Copy link
Contributor

Seems to fix microsoft/vcpkg#41235

@BillyONeal BillyONeal merged commit 3122da7 into microsoft:main Sep 30, 2024
6 checks passed
@BillyONeal
Copy link
Member

Thanks for the superb diagnostics @tmp64 and the fix @autoantwort

ihnorton added a commit to TileDB-Inc/TileDB that referenced this pull request Sep 30, 2024
Fix rtools40 build. vcpkg-tool released a change which no longer treated environment variables as case-insensitive, then removed the variables -- breaking tools which depend on those variables.

Explanation: microsoft/vcpkg#41199 (comment)

x-ref:
```
- microsoft/vcpkg-tool#1501
- via cameleon-rs/cameleon#193
- via microsoft/vcpkg#41154
```
---
TYPE: NO_HISTORY
DESC: Fix rtools40 build.
vszakats pushed a commit to curl/curl that referenced this pull request Oct 3, 2024
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.

[boost-cmake] Build error on x64-windows (download error on GH CI)
4 participants