diff options
| author | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-17 00:33:06 -0400 |
|---|---|---|
| committer | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-17 00:33:06 -0400 |
| commit | d821b0a28a7223d0b49745c53a3ff032fcb001c8 (patch) | |
| tree | 12e13d5ff298a4e4b4f946ceb90b49cbfbe2d2c9 /toolsrc/src/vcpkg_System.cpp | |
| parent | 4921636f6bc92e041a410870ce564615c85a6cfb (diff) | |
| parent | 01b1e39c6a006adba7b9cf2af758be679d0b7eb9 (diff) | |
| download | vcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.tar.gz vcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg
Diffstat (limited to 'toolsrc/src/vcpkg_System.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg_System.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 472f8450f..a4e78d90a 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]; @@ -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) @@ -172,9 +172,9 @@ namespace vcpkg::System return nullptr; auto ret = std::make_unique<std::wstring>(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<DWORD>(ret->size())); - Checks::check_exit(sz2 + 1 == sz); + Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret->pop_back(); return ret; } |
