Skip to content

Commit

Permalink
(MODULES-1908) Munge the setting to ensure we always strip the whites…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
Travis Fields committed Aug 3, 2015
1 parent b499f70 commit 48965fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/puppet/type/ini_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@

newparam(:setting) do
desc 'The name of the setting to be defined.'
munge do |value|
if value =~ /(^\s|\s$)/
Puppet.warn("Settings should not have spaces in the value, we are going to strip the whitespace")
end
value.lstrip.rstrip
end
end

newparam(:path) do
Expand Down

0 comments on commit 48965fb

Please sign in to comment.