diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-12-10 11:39:01 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-12-10 16:25:00 +0100 |
commit | fe6939e9ef24ab52eb57c745eb106204c1acc576 (patch) | |
tree | 4649433005c1355c81ad83889ae244bad698f81c /src/buildtool/main/main.cpp | |
parent | d2c178ddb14fb0ba0a9518e39fafbdcad19715ed (diff) | |
download | justbuild-fe6939e9ef24ab52eb57c745eb106204c1acc576.tar.gz |
Computed Roots: be aware of the serve end point
... as the base repository of a computed root might be absent.
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<ServeApi> 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<ServeApi> serve = ServeApi::Create( - *serve_config, &local_context, &remote_context, &main_apis); #else std::optional<ServeApi> serve; #endif // BOOTSTRAP_BUILD_TOOL |