summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2012-12-04 16:27:06 -0800
committerLamont Granquist <lamont@opscode.com>2012-12-19 15:56:09 -0800
commitd92d3270da83ec9d40dbf54050c6de4922870502 (patch)
tree1a9858541ffa8d8e6d153ad9096690a2b536a26e /lib
parent810bc82882625f13891fafb264539f9bf70a05de (diff)
downloadchef-d92d3270da83ec9d40dbf54050c6de4922870502.tar.gz
add comment about registry instance use
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/mixin/registry_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/mixin/registry_helper.rb b/lib/chef/mixin/registry_helper.rb
index f982a69a0a..02a672b6f1 100644
--- a/lib/chef/mixin/registry_helper.rb
+++ b/lib/chef/mixin/registry_helper.rb
@@ -27,6 +27,8 @@
class Chef
module Mixin
module RegistryHelper
+ # the registry instance is cheap to build and throwing it away ensures we
+ # don't carry any state (e.g. magic 32-bit/64-bit settings) between calls
def registry_key_exists?(key_path, architecture = :machine)
registry = Chef::Win32::Registry.new(run_context, architecture)
registry.key_exists?(key_path)