diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-05-04 14:58:18 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-05-04 14:58:18 -0700 |
| commit | a66b066d4584d6b92d249d71b9348344efc78d5e (patch) | |
| tree | fb4cdc1c934311eaf2da0e3952a33e85f9df7784 /toolsrc/src/vcpkg_System.cpp | |
| parent | a94efe662b0537a606d40bdd4b986b5b2ea246e2 (diff) | |
| download | vcpkg-a66b066d4584d6b92d249d71b9348344efc78d5e.tar.gz vcpkg-a66b066d4584d6b92d249d71b9348344efc78d5e.zip | |
get_environmental_variable() -> get_environment_variable()
Diffstat (limited to 'toolsrc/src/vcpkg_System.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg_System.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index e401e956e..5d4d2b15a 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -25,8 +25,7 @@ namespace vcpkg::System int cmd_execute_clean(const CWStringView cmd_line) { - static const std::wstring system_root = - get_environmental_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); + static const std::wstring system_root = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); static const std::wstring system_32 = system_root + LR"(\system32)"; static const std::wstring new_PATH = Strings::wformat( LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", system_32, system_root, system_32, system_32); @@ -83,7 +82,7 @@ namespace vcpkg::System for (auto&& env_wstring : env_wstrings) { - const Optional<std::wstring> value = System::get_environmental_variable(env_wstring); + const Optional<std::wstring> value = System::get_environment_variable(env_wstring); auto v = value.get(); if (!v || v->empty()) continue; @@ -177,7 +176,7 @@ namespace vcpkg::System putchar('\n'); } - Optional<std::wstring> get_environmental_variable(const CWStringView varname) noexcept + Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept { auto sz = GetEnvironmentVariableW(varname, nullptr, 0); if (sz == 0) return nullopt; @@ -221,14 +220,14 @@ namespace vcpkg::System static const fs::path& get_ProgramFiles() { - static const fs::path p = System::get_environmental_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + static const fs::path p = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); return p; } const fs::path& get_ProgramFiles_32_bit() { static const fs::path p = []() -> fs::path { - auto value = System::get_environmental_variable(L"ProgramFiles(x86)"); + auto value = System::get_environment_variable(L"ProgramFiles(x86)"); if (auto v = value.get()) { return std::move(*v); @@ -241,7 +240,7 @@ namespace vcpkg::System const fs::path& get_ProgramFiles_platform_bitness() { static const fs::path p = []() -> fs::path { - auto value = System::get_environmental_variable(L"ProgramW6432"); + auto value = System::get_environment_variable(L"ProgramW6432"); if (auto v = value.get()) { return std::move(*v); |
