Skip to content

Commit c51a52e

Browse files
committed
ci: fix passing simple values to step parameters
In c6add4f while adding support for more complex parameters we broke passing simple strings. While it can be worked around by quoting the string with '', that makes the simple case more complex than it was before, and breaks previous pipeline definitions. Fix it so if the first character does not look like a python expression, take the value verbatim. Fixes: c6add4f Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 11d8a01 commit c51a52e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.buildkite/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def __call__(self, parser, namespace, value, option_string=None):
139139
res = getattr(namespace, self.dest, {})
140140
key_str, val = value.split("=", maxsplit=1)
141141
keys = key_str.split("/")
142-
update = {keys[-1]: ast.literal_eval(val)}
142+
update = {keys[-1]: ast.literal_eval(val) if val[0] in "[{'" else val}
143143
for key in list(reversed(keys))[1:]:
144144
update = {key: update}
145145
res = overlay_dict(res, update)

0 commit comments

Comments
 (0)