diff options
Diffstat (limited to 'lib/chef/platform/query_helpers.rb')
-rw-r--r-- | lib/chef/platform/query_helpers.rb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb index 3cce4b5d2c..1ddbe09bf4 100644 --- a/lib/chef/platform/query_helpers.rb +++ b/lib/chef/platform/query_helpers.rb @@ -26,27 +26,9 @@ class Chef ChefUtils.windows? end + # @deprecated Windows Nano is not a thing anymore so this check shouldn't be used def windows_nano_server? - return false unless windows? - - require "win32/registry" unless defined?(Win32::Registry) - - # This method may be called before ohai runs (e.g., it may be used to - # determine settings in config.rb). Chef::Win32::Registry.new uses - # node attributes to verify the machine architecture which aren't - # accessible before ohai runs. - nano = nil - key = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Server\\ServerLevels" - access = ::Win32::Registry::KEY_QUERY_VALUE | 0x0100 # nano is 64-bit only - begin - ::Win32::Registry::HKEY_LOCAL_MACHINE.open(key, access) do |reg| - nano = reg["NanoServer"] - end - rescue ::Win32::Registry::Error - # If accessing the registry key failed, then we're probably not on - # nano. Fail through. - end - nano == 1 + false end def supports_msi? |