summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/fetch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r--src/other_tools/just_mr/fetch.cpp10
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