From 9f5dcef077a3db2f6c791e403e5036f6464c9576 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 27 Jun 2024 13:27:06 +0200 Subject: Pass StorageConfig and Storage to LocalApi --- src/buildtool/execution_api/local/local_response.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/local/local_response.hpp') diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp index bcb98a2e..30d47ca7 100644 --- a/src/buildtool/execution_api/local/local_response.hpp +++ b/src/buildtool/execution_api/local/local_response.hpp @@ -42,8 +42,8 @@ class LocalResponse final : public IExecutionResponse { return (output_.action.stdout_digest().size_bytes() != 0); } auto StdErr() noexcept -> std::string final { - if (auto path = storage_->CAS().BlobPath(output_.action.stderr_digest(), - /*is_executable=*/false)) { + if (auto path = storage_.CAS().BlobPath(output_.action.stderr_digest(), + /*is_executable=*/false)) { if (auto content = FileSystemManager::ReadFile(*path)) { return std::move(*content); } @@ -52,8 +52,8 @@ class LocalResponse final : public IExecutionResponse { return {}; } auto StdOut() noexcept -> std::string final { - if (auto path = storage_->CAS().BlobPath(output_.action.stdout_digest(), - /*is_executable=*/false)) { + if (auto path = storage_.CAS().BlobPath(output_.action.stdout_digest(), + /*is_executable=*/false)) { if (auto content = FileSystemManager::ReadFile(*path)) { return std::move(*content); } @@ -87,7 +87,7 @@ class LocalResponse final : public IExecutionResponse { private: std::string action_id_{}; LocalAction::Output output_{}; - gsl::not_null storage_; + Storage const& storage_; ArtifactInfos artifacts_{}; DirSymlinks dir_symlinks_{}; bool populated_{false}; @@ -98,7 +98,7 @@ class LocalResponse final : public IExecutionResponse { gsl::not_null const& storage) noexcept : action_id_{std::move(action_id)}, output_{std::move(output)}, - storage_{storage} {} + storage_{*storage} {} [[nodiscard]] auto Populate() noexcept -> bool { if (populated_) { -- cgit v1.2.3