From fe6939e9ef24ab52eb57c745eb106204c1acc576 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 10 Dec 2024 11:39:01 +0100 Subject: Computed Roots: be aware of the serve end point ... as the base repository of a computed root might be absent. --- src/buildtool/main/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/buildtool/main/main.cpp') diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 629d2d78..9a05769a 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -1048,8 +1048,11 @@ auto main(int argc, char* argv[]) -> int { if (need_rehash and (not git_storage_config)) { return kExitFailure; } + std::optional serve = ServeApi::Create( + *serve_config, &local_context, &remote_context, &main_apis); if (not EvaluateComputedRoots(&repo_config, main_repo, + serve ? &*serve : nullptr, *storage_config, git_storage_config, traverse_args, @@ -1057,9 +1060,6 @@ auto main(int argc, char* argv[]) -> int { eval_root_jobs)) { return kExitFailure; } - - std::optional serve = ServeApi::Create( - *serve_config, &local_context, &remote_context, &main_apis); #else std::optional serve; #endif // BOOTSTRAP_BUILD_TOOL -- cgit v1.2.3