diff --git a/include/vcpkg/base/parallel-algorithms.h b/include/vcpkg/base/parallel-algorithms.h index a253760e29..8d458f8a79 100644 --- a/include/vcpkg/base/parallel-algorithms.h +++ b/include/vcpkg/base/parallel-algorithms.h @@ -78,6 +78,7 @@ namespace vcpkg if (work_count == 1) { work(size_t{}); + return; } WorkCallbackContext context{work, work_count}; diff --git a/src/vcpkg/binarycaching.cpp b/src/vcpkg/binarycaching.cpp index 429c778332..3923cdee06 100644 --- a/src/vcpkg/binarycaching.cpp +++ b/src/vcpkg/binarycaching.cpp @@ -389,21 +389,15 @@ namespace } }); - if (Debug::g_debugging) + for (auto&& job : jobs) { - for (auto&& job : jobs) + job.fbdc.print_to(out_sink); + if (Debug::g_debugging && job.success) { - if (job.success) - { - console_diagnostic_context.report( - DiagnosticLine{DiagKind::Note, - job.zip_resource->path, - msg::format(msgExtractedInto, msg::path = *job.package_dir)}); - } - else - { - job.fbdc.print_to(out_sink); - } + console_diagnostic_context.report( + DiagnosticLine{DiagKind::Note, + job.zip_resource->path, + msg::format(msgExtractedInto, msg::path = *job.package_dir)}); } } }