Affects Version/s: None
Fix Version/s: None
Environment:CentOS 7.4 x86_64
https://docs.cfengine.com/docs/3.10/reference-promise-types-commands.html#arglist is expected to be the proper solution to pass arguments with spaces inside them:
That's particularly useful when there are embedded spaces and quotes in your arguments [...].
But it does not seem to be handled differently than args and therefore does not work.
Here's the example.cf showing the issue:
pouet.sh is as follows:
So in example.cf we passed two arguments to the script ("foo" and "bar baz"), but cfengine passed 3 of them:
I expected this output:
From a quick look at the C code, it seems that cfengine will join all arguments with spaces and then split them again, which defeats the purpose of arglist...
For reference I wrote a simple c program using execv/execl to show what I expected when using argument lists:
and the output when running it: