Actions
Question #11261
closedDouble-ampersand is not an "empty template variable"
Regression:
Description
While writing technique template (*.st), currently it is impossible to use "&&", e.g. in implementation of shell commands.
Writing something like
commands: plugin_exist:: "${rabbitmqpl} list -m -e ^${pluginName}$ | /bin/grep -q ${pluginName} && /bin/echo '+Enabled'"
leads to error in generating promises from such directive.
Looks like Rudder assumes that two ampersands are always quoting template varialbes. But "&&" is just "&&", not an empty template entry.
(And single ampersand may although be needed in shell scripting.)
On the opposite, the following code works ok:
commands: plugin_exist:: "${rabbitmqpl} list -m -e ^${pluginName}$ | /bin/grep -q ${pluginName} || /bin/echo '+notEnabled'"
(?) M.b. there is the way to correctly escape "&" to bypass it inside promise?
Actions