diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-06-16 03:22:17 +1000 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 1e89bff59448bfc22c22f0b03bf965b7f4da0c77 (patch) | |
tree | 69c229ce0b67e062eb6012e7258f5b6b9d790ca5 | |
parent | e6709da4fed6e671dab5af0db3cb87da5b27555e (diff) | |
download | puppet-1e89bff59448bfc22c22f0b03bf965b7f4da0c77.tar.gz puppet-1e89bff59448bfc22c22f0b03bf965b7f4da0c77.tar.xz puppet-1e89bff59448bfc22c22f0b03bf965b7f4da0c77.zip |
Fixes #3514 - CR/LF line ending in puppet.conf cause silent failure
Patch thanks to Alan Barrett
-rw-r--r-- | lib/puppet/util/settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index 11d760f1a..2dedc31da 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -894,13 +894,13 @@ Generated on #{Time.now}. 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 |