diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-13 13:06:09 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-18 12:05:10 +0200 |
commit | 866391f5436488cec823ad6bc0a446c0c9d70625 (patch) | |
tree | 95286334e0ea7ed675014500992a0dfa29b62564 /src/other_tools/just_mr/fetch.cpp | |
parent | 3807eb68512b697662e7bf2b018a9a925967d8b2 (diff) | |
download | justbuild-866391f5436488cec823ad6bc0a446c0c9d70625.tar.gz |
Create an individual instance of RemoteServeConfig in just-mr
...instead of initialization of the singleton.
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index ebba56e5..0f0a0ef1 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -401,13 +401,13 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, bool remote_compatible{common_args.compatible == true}; // setup the API for serving roots - bool serve_api_exists = JustMR::Utils::SetupServeApi( + auto serve_config = JustMR::Utils::CreateServeConfig( common_args.remote_serve_address, auth_args); + if (not serve_config) { + return kExitConfigError; + } - auto serve = serve_api_exists - ? ServeApi::Create(RemoteServeConfig::Instance()) - : std::nullopt; - + auto serve = ServeApi::Create(*serve_config); // check configuration of the serve endpoint provided if (serve) { // if we have a remote endpoint explicitly given by the user, it must |