From 2e953b04bbd8e619172c9d0eeafd0342700d6ee9 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Tue, 9 Apr 2024 10:41:04 +0200 Subject: bugfix: cli: remote-execution-property: allow for accumulating multiple pairs. Before this patch, if the option `--remote-execution-property KEY:VAL` is repeated multiple times (also with different `KEY`s), only the last one is taken into account. This patch fixes the intended behavior. --- CHANGELOG.md | 5 ++++- src/buildtool/common/cli.hpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4a97780..11270ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ A feature release on top of `1.2.0`, backwards compatible. ### Major new features - New subcommand `just serve` to start a target-level caching service, - as described in the corresponding design document. + as described in the corresponding design document. - `just-mr` is able to back up and retrieve distribution files from a remote execution endpoint. This simplifies usage in an environment with restricted internet access. @@ -87,6 +87,9 @@ A feature release on top of `1.2.0`, backwards compatible. some targets. - The expression `"disjoint_map_union"` did not verify disjointness in all cases; this is fixed now. +- The command line option `"--remote-execution-property"` can be + repeated multiple times to list all the properties, but only the + last one was retained. This is fixed now. ## Release `1.2.0` (2023-08-25) diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 7ede3217..cfe2263a 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -438,7 +438,8 @@ static inline auto SetupExecutionPropertiesArguments( "option multiple times will accumulate pairs (latest wins).") ->type_name("KEY:VAL") ->allow_extra_args(false) - ->expected(1, 1); + ->expected(1) + ->take_all(); } static inline auto SetupServeEndpointArguments( -- cgit v1.2.3