diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-08 11:11:26 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-04-08 13:01:16 +0200 |
commit | c8523932a5cc319f2b3dffd1f5db3822c1788895 (patch) | |
tree | 99cd7ba1fae7cec8222c1c4ccfbd107da57f5ca0 /src/buildtool/execution_engine/executor | |
parent | 2ddbd38e3460d445fca51dc674621bb948d9557a (diff) | |
download | justbuild-c8523932a5cc319f2b3dffd1f5db3822c1788895.tar.gz |
executor: properly report failure of tree actions
... calling them as such, and not trying to report command and
environment.
Diffstat (limited to 'src/buildtool/execution_engine/executor')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 18 |
1 files changed, 14 insertions, 4 deletions
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<DependencyGraph::ActionNode const*> const& action, gsl::not_null<Progress*> 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()) { |