aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Environment.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-02-14 13:26:21 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-02-14 13:26:21 -0800
commit0d47ce63ed1cc5159a038de0a8446e3828b8aeeb (patch)
tree1a680c17afd3dbeece3fbd5ca37a904f7a726cbe /toolsrc/src/vcpkg_Environment.cpp
parentc11b2c790e0260434d057cd5fbeccd59f36732c7 (diff)
downloadvcpkg-0d47ce63ed1cc5159a038de0a8446e3828b8aeeb.tar.gz
vcpkg-0d47ce63ed1cc5159a038de0a8446e3828b8aeeb.zip
Add System::set_environmental_variable()
Diffstat (limited to 'toolsrc/src/vcpkg_Environment.cpp')
-rw-r--r--toolsrc/src/vcpkg_Environment.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/toolsrc/src/vcpkg_Environment.cpp b/toolsrc/src/vcpkg_Environment.cpp
index abde735cb..772213695 100644
--- a/toolsrc/src/vcpkg_Environment.cpp
+++ b/toolsrc/src/vcpkg_Environment.cpp
@@ -60,7 +60,7 @@ namespace vcpkg::Environment
System::get_environmental_variable(L"PATH"),
default_git_installation_dir.native(),
default_git_installation_dir_x86.native());
- _wputenv_s(L"PATH", path_buf.c_str());
+ System::set_environmental_variable(L"PATH", path_buf.c_str());
static constexpr std::array<int, 3> git_version = {2,0,0};
static const std::wstring version_check_cmd = L"git --version 2>&1";
@@ -76,7 +76,7 @@ namespace vcpkg::Environment
System::get_environmental_variable(L"PATH"),
default_cmake_installation_dir.native(),
default_cmake_installation_dir_x86.native());
- _wputenv_s(L"PATH", path_buf.c_str());
+ System::set_environmental_variable(L"PATH", path_buf.c_str());
static constexpr std::array<int, 3> cmake_version = {3,7,2};
static const std::wstring version_check_cmd = L"cmake --version 2>&1";
@@ -88,7 +88,7 @@ namespace vcpkg::Environment
{
const fs::path downloaded_nuget = paths.downloads / "nuget-3.5.0";
const std::wstring path_buf = Strings::wformat(L"%s;%s", downloaded_nuget.native(), System::get_environmental_variable(L"PATH"));
- _wputenv_s(L"PATH", path_buf.c_str());
+ System::set_environmental_variable(L"PATH", path_buf.c_str());
static constexpr std::array<int, 3> nuget_version = {3,3,0};
static const std::wstring version_check_cmd = L"nuget 2>&1";