summaryrefslogtreecommitdiff
path: root/lib/mixlib/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mixlib/config.rb')
-rw-r--r--lib/mixlib/config.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mixlib/config.rb b/lib/mixlib/config.rb
index 517aae7..4927153 100644
--- a/lib/mixlib/config.rb
+++ b/lib/mixlib/config.rb
@@ -174,6 +174,7 @@ module Mixlib
end
result
end
+ alias :to_hash :save
# Restore non-default values from the given hash.
#
@@ -416,7 +417,7 @@ module Mixlib
if configurables.has_key?(symbol)
configurables[symbol].set(self.configuration, value)
elsif config_contexts.has_key?(symbol)
- config_contexts[symbol].restore(value)
+ config_contexts[symbol].restore(value.to_hash)
else
if config_strict_mode == :warn
Chef::Log.warn("Setting unsupported config value #{symbol}.")