From f82adab238f4b45d43049687c8e52bf7372ba053 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 27 Jun 2024 12:22:09 +0200 Subject: Pass StorageConfig and Storage to Serve --- src/buildtool/main/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/buildtool/main/main.cpp') diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 3be560bb..39806c68 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -814,10 +814,15 @@ auto main(int argc, char* argv[]) -> int { /*repo_config=*/nullptr, &*auth_config, RemoteExecutionConfig::RemoteAddress()}; - auto serve = ServeApi::Create(*serve_config, &serve_apis); + auto serve = ServeApi::Create( + *serve_config, &Storage::Instance(), &serve_apis); bool with_execute = not RemoteExecutionConfig::RemoteAddress(); - return serve_server->Run( - *serve_config, serve, serve_apis, with_execute) + return serve_server->Run(*serve_config, + StorageConfig::Instance(), + Storage::Instance(), + serve, + serve_apis, + with_execute) ? kExitSuccess : kExitFailure; } @@ -903,7 +908,7 @@ auto main(int argc, char* argv[]) -> int { #ifndef BOOTSTRAP_BUILD_TOOL std::optional serve = - ServeApi::Create(*serve_config, &main_apis); + ServeApi::Create(*serve_config, &Storage::Instance(), &main_apis); #else std::optional serve; #endif // BOOTSTRAP_BUILD_TOOL -- cgit v1.2.3