From d02d602090b81e301fcf773d737e0423f5966bf0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 13 Mar 2017 16:17:47 -0700 Subject: System::cmd_execute_and_capture_output() now redirects std::err to std::out --- toolsrc/src/vcpkg_System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/vcpkg_System.cpp') diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 472f8450f..b872fe2fd 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -103,7 +103,7 @@ namespace vcpkg::System // Flush stdout before launching external process fflush(stdout); - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); + const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); std::string output; char buf[1024]; -- cgit v1.2.3 From 4114d87a0774fff7d8bc5e041bb56158bfdbcac8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 13 Mar 2017 17:38:04 -0700 Subject: All Checks now take LineInfo as the first argument --- toolsrc/src/vcpkg_System.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/vcpkg_System.cpp') diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index b872fe2fd..14a6f3a73 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -172,9 +172,9 @@ namespace vcpkg::System return nullptr; auto ret = std::make_unique(sz, L'\0'); - Checks::check_exit(MAXDWORD >= ret->size()); + Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret->size()); auto sz2 = GetEnvironmentVariableW(varname, ret->data(), static_cast(ret->size())); - Checks::check_exit(sz2 + 1 == sz); + Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret->pop_back(); return ret; } -- cgit v1.2.3 From 49098fe55ddc82d5a66af1f175960d5165b0712d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 15 Mar 2017 16:23:40 -0700 Subject: Add -NoProfile to powershell commands --- toolsrc/src/vcpkg_System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/vcpkg_System.cpp') diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 14a6f3a73..a4e78d90a 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -132,7 +132,7 @@ namespace vcpkg::System std::wstring create_powershell_script_cmd(const fs::path& script_path, const std::wstring& args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::wformat(LR"(powershell -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); + return Strings::wformat(LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); } void print(const char* message) -- cgit v1.2.3