Issue #19632 has been updated by Henrik Lindberg.

Subject changed from Bracket in resource title causes ArgumentError (lexer bug) 
to Resource title ending with name in brackets causes ArgumentError 
Category set to language
Keywords set to resource language brackets title


----------------------------------------
Bug #19632: Resource title ending with name in brackets causes ArgumentError 
https://projects.puppetlabs.com/issues/19632#change-84736

Author: Reid Vandewiele
Status: Accepted
Priority: Normal
Assignee: 
Category: language
Target version: 
Affected Puppet version: 
Keywords: resource language brackets title
Branch: 


Running a command such as (or applying a manifests with a similar resource):

<pre>
puppet apply -e "notify { 'thisisa[bug]': }"
</pre>

Results in

<pre>
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource 
type notify at line 1 on node pseudonix.local
</pre>

However, the following works just fine.

<pre>
[reid@pseudonix:~] % puppet apply -e "notify { 'Notify[foo]': message => \$name 
}"
notice: main
notice: /Stage[main]//Notify[foo]/message: defined 'message' as 'main'
notice: Finished catalog run in 0.03 seconds
</pre>

Also working fine is:

<pre>
[reid@pseudonix:~] % puppet apply -e "notify { 'thisis[not]abug': }"
notice: thisis[not]abug
notice: /Stage[main]//Notify[thisis[not]abug]/message: defined 'message' as 
'thisis[not]abug'
notice: Finished catalog run in 0.03 seconds
</pre>

This appears to be a bug in the lexer and is triggered by any resource name 
ending in a closing bracket with a matching opening bracket earlier in the 
string. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to