diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-02 15:54:45 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-02 15:54:45 +0000 |
commit | e8c912d1cdd56a48370bd47dec83f3ef126c23ea (patch) | |
tree | 87b1a6f1071fd51bcbd0dc93b0a4ac6e048bc146 /lib | |
parent | 37d2850ade3c4e8e94f3abdbc01afc159ed7dbd0 (diff) | |
download | puppet-e8c912d1cdd56a48370bd47dec83f3ef126c23ea.tar.gz puppet-e8c912d1cdd56a48370bd47dec83f3ef126c23ea.tar.xz puppet-e8c912d1cdd56a48370bd47dec83f3ef126c23ea.zip |
Allowing dashes in class names, although grammar rules restrict it from working anywhere except node names or in tag(). They are valid in host names, and many companies have them in the host names; in fact, this fix is for a company with this exact problem -- they cannot use puppet with their nodes because all their hosts have dashes in the host names.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1165 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/scope.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index 7239feb17..394c46033 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -631,7 +631,7 @@ module Puppet::Parser # hash. We store the object ID, not class name, so that we # can support multiple unrelated classes with the same name. def setclass(id, name) - unless name =~ /^[a-z]\w*$/ + unless name =~ /^[a-z][\w-]*$/ raise Puppet::ParseError, "Invalid class name '%s'" % name end |