Merge pull request #183 from cyberious/MODULES-1908
(MODULES-1908) Munge the setting to ensure we always strip the whitespace
This commit is contained in:
commit
f1e4313740
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,12 @@ Puppet::Type.newtype(:ini_setting) do
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue