summaryrefslogtreecommitdiff
path: root/lib/chef/win32/registry.rb
diff options
context:
space:
mode:
authorPrajaktaPurohit <prajakta@opscode.com>2012-12-07 12:41:36 -0800
committerLamont Granquist <lamont@opscode.com>2012-12-19 15:56:11 -0800
commit989200e56d601d65c2696a73ab7372b4efc8e2db (patch)
tree222c906e4c43d2fab2ed269c0cab6d3f03967ab4 /lib/chef/win32/registry.rb
parent094ca1fcad4329decb897bf378341955805feae3 (diff)
downloadchef-989200e56d601d65c2696a73ab7372b4efc8e2db.tar.gz
Returning true accross all functions when the state wanted by user is attained
Diffstat (limited to 'lib/chef/win32/registry.rb')
-rw-r--r--lib/chef/win32/registry.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb
index b047b63012..bc78423050 100644
--- a/lib/chef/win32/registry.rb
+++ b/lib/chef/win32/registry.rb
@@ -81,6 +81,7 @@ class Chef
reg.write(value[:name], get_type_from_name(value[:type]), value[:data])
Chef::Log.debug("Value #{value[:name]} in registry key #{key_path} updated")
end
+ true
end
def delete_value(key_path, value)
@@ -97,6 +98,7 @@ class Chef
else
Chef::Log.debug("Value #{value[:name]} in registry key #{key_path} does not exist, not updated")
end
+ true
end
def create_key(key_path, recursive)
@@ -116,13 +118,14 @@ class Chef
hive.create(key, ::Win32::Registry::KEY_WRITE | registry_system_architecture)
Chef::Log.debug("Registry key #{key_path} created")
end
+ true
end
def delete_key(key_path, recursive)
Chef::Log.debug("Deleting registry key #{key_path}")
unless key_exists?(key_path)
Chef::Log.debug("Registry key #{key_path}, does not exist, not deleting")
- return
+ return true
end
hive, key = get_hive_and_key(key_path)
key_parent = key.split("\\")
@@ -143,6 +146,7 @@ class Chef
reg.delete_key(key_to_delete)
end
end
+ true
end
def key_exists?(key_path)