Issue #3514 has been updated by Alan Barrett.

>From the code in util/settings.rb, it appears that any kind of trailing white 
>space will cause problems, and carriage return is simply a kind of white 
>space.  Perhaps this patch will help.

<pre>
--- lib/puppet/util/settings.rb
+++ lib/puppet/util/settings.rb (working copy)
@@ -892,13 +892,13 @@
         text.split(/\n/).each { |line|
             count += 1
             case line
-            when /^\s*\[(\w+)\]$/
+            when /^\s*\[(\w+)\]\s*$/
                 section = $1.intern # Section names
                 # Add a meta section
                 result[section][:_meta] ||= {}
             when /^\s*#/; next # Skip comments
             when /^\s*$/; next # Skip blanks
-            when /^\s*(\w+)\s*=\s*(.*)$/ # settings
+            when /^\s*(\w+)\s*=\s*(.*?)\s*$/ # settings
                 var = $1.intern

                 # We don't want to munge modes, because they're specified in 
octal, so we'll
</pre>
----------------------------------------
Bug #3514: CR/LF line ending in puppet.conf cause silent failure
http://projects.puppetlabs.com/issues/3514

Author: Byron Appelt
Status: Accepted
Priority: Normal
Assigned to: Markus Roberts
Category: error reporting
Target version: 
Affected version: 0.25.4
Keywords: 
Branch: 


If a puppet.conf file has CR/LF endings, the file is essentially ignored. It 
would be nice if CR/LF endings could be supported since it is common for 
developers to edit files on Windows machines, however that would be a feature 
request rather than a bug. However, not reporting any kind of error seems to be 
a real problem. The relevant line of code would seem to be Line 892 from 
puppet/util/settings.rb:

        text.split(/\n/).each { |line|




-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to