diff --git a/src/vcpkg.cpp b/src/vcpkg.cpp index 29a5b5da16..775ddcfc23 100644 --- a/src/vcpkg.cpp +++ b/src/vcpkg.cpp @@ -186,7 +186,16 @@ int main(const int argc, const char* const* const argv) } #endif set_environment_variable("VCPKG_COMMAND", get_exe_path_of_current_process().generic_u8string()); + + // Prevent child processes (ex. cmake) from producing "colorized" + // output (which may include ANSI escape codes), since it would + // complicate parsing the output. + // + // See http://bixense.com/clicolors for the semantics associated with + // the CLICOLOR and CLICOLOR_FORCE env variables + // set_environment_variable("CLICOLOR_FORCE", {}); + set_environment_variable("CLICOLOR", "0"); Checks::register_global_shutdown_handler([]() { const auto elapsed_us_inner = GlobalState::timer.microseconds();