From 1c9838b55147c5a564e83f25d4fd5ab543144340 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 5 Apr 2017 16:28:09 -0700 Subject: [vcpkg-debug] Add debugging for calls to cmd_execute_clean() --- toolsrc/src/vcpkg_System.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'toolsrc/src/vcpkg_System.cpp') diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index f000b7317..4329219c2 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "vcpkg_System.h" #include "vcpkg_Checks.h" +#include "vcpkglib.h" namespace vcpkg::System { @@ -86,7 +87,11 @@ namespace vcpkg::System // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); + if (g_debugging) + System::println("[DEBUG] _wspawnlpe(cmd.exe /c %s)", Strings::utf16_to_utf8(actual_cmd_line)); auto exit_code = _wspawnlpe(_P_WAIT, L"cmd.exe", L"cmd.exe", L"/c", actual_cmd_line.c_str(), nullptr, env_cstr.data()); + if (g_debugging) + System::println("[DEBUG] _wspawnlpe() returned %d", exit_code); return static_cast(exit_code); } -- cgit v1.2.3