From 3c2185bf17b1c1a631366aa11591da3e3beb51eb Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 7 Mar 2023 14:28:56 +0100 Subject: Just-mr: Add --local-launcher option Also update just-mr section-1 man page --- src/other_tools/just_mr/cli.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/other_tools/just_mr/cli.hpp') diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index 2174c331..c9a36387 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -37,6 +37,7 @@ struct MultiRepoCommonArguments { std::optional checkout_locations_file{std::nullopt}; std::vector explicit_distdirs{}; JustMR::PathsPtr just_mr_paths = std::make_shared(); + std::optional> local_launcher{std::nullopt}; std::optional just_path{std::nullopt}; std::optional main{std::nullopt}; std::optional rc_path{std::nullopt}; @@ -99,6 +100,18 @@ static inline void SetupMultiRepoCommonArguments( }, "Specification file for checkout locations.") ->type_name("CHECKOUT_LOCATION"); + app->add_option_function( + "--local-launcher", + [clargs](auto const& launcher_raw) { + clargs->local_launcher = + nlohmann::json::parse(launcher_raw) + .template get>(); + }, + "JSON array with the list of strings representing the launcher to " + "prepend actions' commands before being executed locally.") + ->type_name("JSON") + ->run_callback_for_default() + ->default_val(nlohmann::json{"env", "--"}.dump()); app->add_option_function( "--distdir", [clargs](auto const& distdir_raw) { -- cgit v1.2.3