summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/launch.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-01-24 09:55:31 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-01-24 18:57:50 +0100
commit617fad94f3ea4566ad4124d2a3731d633bd84b9d (patch)
treecbb038a0228f839a7262add5f2d10c98e31a2d87 /src/other_tools/just_mr/launch.cpp
parentf6c2fe3e30bc5e92e2c8134fb2135a532788bc3b (diff)
downloadjustbuild-617fad94f3ea4566ad4124d2a3731d633bd84b9d.tar.gz
just-mr: in to_git warning, report actual tool names
... instead of some hard-coded strings, as that can be confusing when the tool is packaged under a different name.
Diffstat (limited to 'src/other_tools/just_mr/launch.cpp')
-rw-r--r--src/other_tools/just_mr/launch.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp
index 2c771836..99496306 100644
--- a/src/other_tools/just_mr/launch.cpp
+++ b/src/other_tools/just_mr/launch.cpp
@@ -15,6 +15,7 @@
#include "src/other_tools/just_mr/launch.hpp"
#include <filesystem>
+#include <utility>
#include "nlohmann/json.hpp"
#include "src/buildtool/build_engine/expression/configuration.hpp"
@@ -34,7 +35,8 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
MultiRepoJustSubCmdsArguments const& just_cmd_args,
MultiRepoLogArguments const& log_args,
MultiRepoRemoteAuthArguments const& auth_args,
- bool forward_build_root) -> int {
+ bool forward_build_root,
+ std::string multi_repo_tool_name) -> int {
// check if subcmd_name can be taken from additional args
auto additional_args_offset = 0U;
auto subcommand = just_cmd_args.subcmd_name;
@@ -70,10 +72,14 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
setup_args,
just_cmd_args,
auth_args,
- /*interactive=*/false);
+ /*interactive=*/false,
+ std::move(multi_repo_tool_name));
if (not mr_config_path) {
Logger::Log(LogLevel::Error,
- "Failed to setup config while calling \"just {}\"",
+ "Failed to setup config for calling \"{} {}\"",
+ common_args.just_path
+ ? common_args.just_path->string()
+ : kDefaultJustPath,
*subcommand);
return kExitSetupError;
}