Remove System::set_environmental_variable()
MODIFY
include/vcpkg_System.h
include/vcpkg_System.h
@@ -61,7 +61,5 @@ namespace vcpkg::System
optional<std::wstring> get_environmental_variable(const cwstring_view varname) noexcept;
- void set_environmental_variable(const cwstring_view varname, const cwstring_view varvalue) noexcept;
-
optional<std::wstring> get_registry_string(HKEY base, const cwstring_view subkey, const cwstring_view valuename);
}

MODIFY
src/vcpkg_System.cpp
src/vcpkg_System.cpp
@@ -175,11 +175,6 @@ namespace vcpkg::System
return *ret.release();
}
- void set_environmental_variable(const cwstring_view varname, const cwstring_view varvalue) noexcept
- {
- _wputenv_s(varname, varvalue);
- }
-
static bool is_string_keytype(DWORD hkey_type)
{
return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ;

Remove System::set_environmental_variable()