tasks.*.run
templates: add shell escaping for arg()
and option()
#2906
Labels
enhancement
New feature or request
In v2024.11.0 both
arg()
andoption()
returns their values as is. As their values are supposed to be used in a shell command's param they needs to be escaped (using rules depending on currenttasks.*.shell
value).Partial workaround is to surround them in a single quotes (e.g.
'{{ arg(name="a") }}'
) - but this way we won't be able to use single quote itself in values.Another but related issue:
arg(var=true)
andoption(var=true)
currently join list of their values using single space and this makes it impossible to correctly split it back to a list of values (which can itself contain spaces, quotes, shell wildcards, etc.). As a result currently it can be used only for list of values which does not contain any spaces/quotes/shell wildcards/etc.The text was updated successfully, but these errors were encountered: