diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-03-01 18:07:04 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-03-08 14:18:43 +0100 |
commit | 274ee28fb5d8d5dea123eaa9fc51fd83eeda145a (patch) | |
tree | 0a048dbcc85c9372703ec7f388699002ac88ca2c /src/buildtool/execution_api/local/local_action.cpp | |
parent | 2ebf355989eb92ac9967eceee0af14d39477afe0 (diff) | |
download | justbuild-274ee28fb5d8d5dea123eaa9fc51fd83eeda145a.tar.gz |
SystemCommand: Transfer outfile responsibility to caller
Diffstat (limited to 'src/buildtool/execution_api/local/local_action.cpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_action.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp index 1d964533..d9900a61 100644 --- a/src/buildtool/execution_api/local/local_action.cpp +++ b/src/buildtool/execution_api/local/local_action.cpp @@ -145,17 +145,17 @@ auto LocalAction::Run(bazel_re::Digest const& action_id) const noexcept std::copy(cmdline_.begin(), cmdline_.end(), std::back_inserter(cmdline)); SystemCommand system{"LocalExecution"}; - auto const command_output = + auto const exit_code = system.Execute(cmdline, env_vars_, build_root, *exec_path); - if (command_output.has_value()) { + if (exit_code.has_value()) { Output result{}; - result.action.set_exit_code(command_output->return_value); + result.action.set_exit_code(*exit_code); if (gsl::owner<bazel_re::Digest*> digest_ptr = - DigestFromOwnedFile(command_output->stdout_file)) { + DigestFromOwnedFile(*exec_path / "stdout")) { result.action.set_allocated_stdout_digest(digest_ptr); } if (gsl::owner<bazel_re::Digest*> digest_ptr = - DigestFromOwnedFile(command_output->stderr_file)) { + DigestFromOwnedFile(*exec_path / "stderr")) { result.action.set_allocated_stderr_digest(digest_ptr); } |