Closed PierreR closed 6 years ago
Is it accepted with single parens?
I guess it is. Looking at the help from puppetlabs-translate there no usage of double parens. I am actually surprised this is valid puppet syntax.
I guess it is. Looking at the help from puppetlabs-translate there no usage of double parens. I am actually surprised this is valid puppet syntax.
I think puppetresources
doesn't like that fail is called without parens, that is why I wonder if it worked with single parens.
No it does not work with single parens:
ERROR: (swarm.manager.dev) cannot parse ./modules/application/manifests/role/swarm/test.pp:3:17:
|
3 | fail translate('You must provide the $bridge parameter.')
| ^
unexpected '('
expecting ',', '}', operator, or the rest of Statement
Do you want to support that idiom with the single parens ? Not at all or only in permissive mode ?
fail translate('Custom package source is currently not implemented on windows.')
The problem is not with the parens, it is that you can apparently call functions like fail
with no parens ...
Your translate function is fine, it is a parser problem with fail "foo"
.
Ok thanks I will fill in a different issue if needed.
I was about to push this PR but it does not accept the the following syntax with the double
((
.Any idea ?
https://github.com/puppetlabs/puppetlabs-docker/blob/master/manifests/init.pp#L498