summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-28 12:14:56 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-28 12:15:42 -0800
commitf9987b12ce8b988251b651d10ec2a479756c3e2e (patch)
tree30e6b7b4ff513c5c3b0bf17bb31c7885ee776407 /lib/chef/platform
parent7b7d1556dfdcbec9b78334b89ec8fae35e709fc0 (diff)
downloadchef-f9987b12ce8b988251b651d10ec2a479756c3e2e.tar.gz
Remove all the code that checks for Windows Nanonano_support
Windows Nano isn't a thing anymore so we shouldn't spending compute time checking to see if we're on Windows Nano Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/query_helpers.rb22
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?