summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/setup_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr/setup_utils.cpp')
-rw-r--r--src/other_tools/just_mr/setup_utils.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/other_tools/just_mr/setup_utils.cpp b/src/other_tools/just_mr/setup_utils.cpp
index c3799b1f..c6805e07 100644
--- a/src/other_tools/just_mr/setup_utils.cpp
+++ b/src/other_tools/just_mr/setup_utils.cpp
@@ -236,17 +236,20 @@ auto ReadConfiguration(
}
auto GetRemoteApi(std::optional<std::string> const& remote_exec_addr,
+ std::optional<std::string> const& remote_serve_addr,
MultiRepoRemoteAuthArguments const& auth)
-> IExecutionApi::Ptr {
- // we only allow remotes in native mode
- if (remote_exec_addr and not Compatibility::IsCompatible()) {
+ // if only a serve endpoint address is given, we assume it is one that acts
+ // also as remote-execution
+ auto remote_addr = remote_exec_addr ? remote_exec_addr : remote_serve_addr;
+ if (remote_addr) {
// setup authentication
SetupAuthConfig(auth);
// setup remote
- if (not RemoteExecutionConfig::SetRemoteAddress(*remote_exec_addr)) {
+ if (not RemoteExecutionConfig::SetRemoteAddress(*remote_addr)) {
Logger::Log(LogLevel::Error,
"setting remote execution address '{}' failed.",
- *remote_exec_addr);
+ *remote_addr);
std::exit(kExitConfigError);
}
auto address = RemoteExecutionConfig::RemoteAddress();