Use System::cmd_execute_clean() for `build`, `create`, `portsdiff`
MODIFY
src/commands_build.cpp
src/commands_build.cpp
@@ -60,7 +60,7 @@ namespace vcpkg::Commands::Build
const ElapsedTime timer = ElapsedTime::createStarted();
- int return_code = System::cmd_execute(command);
+ int return_code = System::cmd_execute_clean(command);
auto buildtimeus = timer.microseconds();
TrackMetric("buildtimeus-" + spec.toString(), buildtimeus);

MODIFY
src/commands_create.cpp
src/commands_create.cpp
@@ -36,6 +36,6 @@ namespace vcpkg::Commands::Create
}
const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args);
- exit(System::cmd_execute(cmd_launch_cmake));
+ exit(System::cmd_execute_clean(cmd_launch_cmake));
}
}

MODIFY
src/commands_portsdiff.cpp
src/commands_portsdiff.cpp
@@ -46,7 +46,7 @@ namespace vcpkg::Commands::PortsDiff
checkout_this_dir,
L".vcpkg-root",
git_exe.native());
- System::cmd_execute(cmd);
+ System::cmd_execute_clean(cmd);
const std::vector<SourceParagraph> source_paragraphs = Paragraphs::load_all_ports(temp_checkout_path / ports_dir_name_as_string);
const std::map<std::string, std::string> names_and_versions = Paragraphs::extract_port_names_and_versions(source_paragraphs);
fs::remove_all(temp_checkout_path);

Use System::cmd_execute_clean() for `build`, `create`, `portsdiff`