summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2024-04-09 10:41:04 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-10 16:07:46 +0200
commit10d12b68c685f453c8f1da8ff90d4af811fcfe5b (patch)
tree973175c4fc8141cbefdce831b3f91540f694e0e7
parent32fe9f005ce270a9f5a47b0fab1f8a718edbd1be (diff)
downloadjustbuild-10d12b68c685f453c8f1da8ff90d4af811fcfe5b.tar.gz
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)
-rw-r--r--CHANGELOG.md3
-rw-r--r--src/buildtool/common/cli.hpp3
2 files changed, 5 insertions, 1 deletions
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(