From 10d12b68c685f453c8f1da8ff90d4af811fcfe5b 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. (cherry picked from commit 2e953b04bbd8e619172c9d0eeafd0342700d6ee9) --- CHANGELOG.md | 3 +++ src/buildtool/common/cli.hpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbcc592e..b771d831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ Bug fixes on top of release `1.2.4`. - A staging conflict in the test setup was fixed. - 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.4` (2023-12-19) diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index a49b2f6b..fcb7a1ff 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -394,7 +394,8 @@ static inline auto SetupEndpointArguments( "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 SetupCommonBuildArguments( -- cgit v1.2.3