summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Edwards <adamed@opscode.com>2014-05-28 12:31:38 -0700
committersersut <serdar@opscode.com>2014-05-30 13:05:49 -0700
commit02419468222668cc1dd414470416f396d5db46eb (patch)
treeeb9d687bb363954240c5a9ffb14a0b3b1eda0f29
parentf8485ae5e8f49f8e1057460263465a7584db3f03 (diff)
downloadchef-02419468222668cc1dd414470416f396d5db46eb.tar.gz
Fix merge issue with incorrect use of wmi_object key instead of wmi_ole_object method
-rw-r--r--lib/chef/provider/env/windows.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/env/windows.rb b/lib/chef/provider/env/windows.rb
index c38029b9ef..297de94083 100644
--- a/lib/chef/provider/env/windows.rb
+++ b/lib/chef/provider/env/windows.rb
@@ -59,8 +59,8 @@ class Chef
def env_obj(key_name)
wmi = WmiLite::Wmi.new
environment_variables = wmi.instances_of('Win32_Environment')
- new_result = find_env(environment_variables, key_name)
- new_result.nil? ? nil : new_result[:wmi_object]
+ existing_variable = find_env(environment_variables, key_name)
+ existing_variable.nil? ? nil : existing_variable.wmi_ole_object
end
#see: http://msdn.microsoft.com/en-us/library/ms682653%28VS.85%29.aspx