get_environmental_variable() -> get_environment_variable()
MODIFY
include/vcpkg_System.h
include/vcpkg_System.h
@@ -61,7 +61,7 @@ namespace vcpkg::System
return println(c, Strings::format(messageTemplate, messageArg1, messageArgs...));
}
- Optional<std::wstring> get_environmental_variable(const CWStringView varname) noexcept;
+ Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept;
Optional<std::wstring> get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename);

MODIFY
src/VcpkgPaths.cpp
src/VcpkgPaths.cpp
@@ -256,7 +256,7 @@ namespace vcpkg
static Optional<fs::path> get_VS2015_installation_instance()
{
- const Optional<std::wstring> vs2015_cmntools_optional = System::get_environmental_variable(L"VS140COMNTOOLS");
+ const Optional<std::wstring> vs2015_cmntools_optional = System::get_environment_variable(L"VS140COMNTOOLS");
if (auto v = vs2015_cmntools_optional.get())
{
const fs::path vs2015_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because

MODIFY
src/commands_edit.cpp
src/commands_edit.cpp
@@ -23,7 +23,7 @@ namespace vcpkg::Commands::Edit
if (env_EDITOR.empty())
{
- const Optional<std::wstring> env_EDITOR_optional = System::get_environmental_variable(L"EDITOR");
+ const Optional<std::wstring> env_EDITOR_optional = System::get_environment_variable(L"EDITOR");
if (auto e = env_EDITOR_optional.get())
{
env_EDITOR = *e;

MODIFY
src/commands_integrate.cpp
src/commands_integrate.cpp
@@ -141,7 +141,7 @@ namespace vcpkg::Commands::Integrate
static fs::path get_appdata_targets_path()
{
static const fs::path local_app_data =
- fs::path(System::get_environmental_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO));
+ fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO));
return local_app_data / "vcpkg" / "vcpkg.user.targets";
}

MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -45,7 +45,7 @@ static void inner(const VcpkgCmdArguments& args)
}
else
{
- const Optional<std::wstring> vcpkg_root_dir_env = System::get_environmental_variable(L"VCPKG_ROOT");
+ const Optional<std::wstring> vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT");
if (auto v = vcpkg_root_dir_env.get())
{
vcpkg_root_dir = fs::stdfs::absolute(*v);
@@ -82,7 +82,7 @@ static void inner(const VcpkgCmdArguments& args)
else
{
const Optional<std::wstring> vcpkg_default_triplet_env =
- System::get_environmental_variable(L"VCPKG_DEFAULT_TRIPLET");
+ System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET");
if (auto v = vcpkg_default_triplet_env.get())
{
default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v));

MODIFY
src/vcpkg_System.cpp
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);

get_environmental_variable() -> get_environment_variable()