From c8523932a5cc319f2b3dffd1f5db3822c1788895 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 8 Apr 2025 11:11:26 +0200 Subject: executor: properly report failure of tree actions ... calling them as such, and not trying to report command and environment. --- src/buildtool/execution_engine/executor/executor.hpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 7d3d004d..1981cb28 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -776,10 +776,20 @@ class ExecutorImpl { gsl::not_null const& action, gsl::not_null const& progress) noexcept { std::ostringstream msg{}; - msg << "Failed to execute command "; - msg << nlohmann::json(action->Command()).dump(); - msg << " in environment "; - msg << nlohmann::json(action->Env()).dump(); + if (action->Content().IsTreeOverlayAction() or + action->Content().IsTreeAction()) { + msg << "Failed to execute tree"; + if (action->Content().IsTreeOverlayAction()) { + msg << "-overlay"; + } + msg << " action."; + } + else { + msg << "Failed to execute command "; + msg << nlohmann::json(action->Command()).dump(); + msg << " in environment "; + msg << nlohmann::json(action->Env()).dump(); + } auto const& origin_map = progress->OriginMap(); auto origins = origin_map.find(action->Content().Id()); if (origins != origin_map.end() and not origins->second.empty()) { -- cgit v1.2.3