From 617fad94f3ea4566ad4124d2a3731d633bd84b9d Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 24 Jan 2024 09:55:31 +0100 Subject: 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. --- src/other_tools/just_mr/launch.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/other_tools/just_mr/launch.cpp') 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 +#include #include "nlohmann/json.hpp" #include "src/buildtool/build_engine/expression/configuration.hpp" @@ -34,7 +35,8 @@ auto CallJust(std::optional 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 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; } -- cgit v1.2.3