summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util/settings.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index 532fce960..002bc0b1a 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -147,6 +147,7 @@ class Puppet::Util::Settings
@cache.clear
value = munge_value(value) if value
str = opt.sub(/^--/,'')
+
bool = true
newstr = str.sub(/^no-/, '')
if newstr != str
@@ -155,8 +156,10 @@ class Puppet::Util::Settings
end
str = str.intern
- if value == "" or value.nil?
- value = bool
+ if @config[str].is_a?(Puppet::Util::Settings::BooleanSetting)
+ if value == "" or value.nil?
+ value = bool
+ end
end
set_value(str, value, :cli)