diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 3cba3896..6ed5a55f 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -281,6 +281,7 @@ class ExecutorImpl { logger.Emit(LogLevel::Error, "action returned non-zero exit code {}", response->ExitCode()); + PrintError(logger, action->Command()); return false; } } @@ -301,6 +302,7 @@ class ExecutorImpl { } return message; }); + PrintError(logger, action->Command()); return false; } @@ -337,6 +339,13 @@ class ExecutorImpl { }); } } + + void static PrintError(Logger const& logger, + std::vector<std::string> const& command) noexcept { + logger.Emit(LogLevel::Error, + "Failed to execute command:\n{}", + nlohmann::json{command}.dump()); + } }; /// \brief Executor for using concrete Execution API. |