diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-20 00:40:41 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-20 17:54:25 -0700 |
commit | b0ed8efa0cd738df7c0fdbb2469770166132d579 (patch) | |
tree | b99b89d98e10e44960aeee3484ee6d9b315f4c9b /spec/support | |
parent | ffbb4ac549aec65e151cbbc04a1c7a07b768b445 (diff) | |
download | chef-b0ed8efa0cd738df7c0fdbb2469770166132d579.tar.gz |
Simplify macos detection in specs to include big surmac_spec
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/platform_helpers.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index 2c83287959..6298e4440d 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -95,8 +95,8 @@ def windows_user_right?(right) Chef::ReservedNames::Win32::Security.get_account_right(ENV["USERNAME"]).include?(right) end -def mac_osx_1014? - if mac_osx? +def macos_1014? + if macos? ver = Chef::Version.new(ohai[:platform_version]) return ver.major == 10 && ver.minor == 14 end @@ -104,19 +104,6 @@ def mac_osx_1014? false end -def mac_osx? - if File.exist? "/usr/bin/sw_vers" - result = ShellHelpers.shell_out("/usr/bin/sw_vers") - result.stdout.each_line do |line| - if /^ProductName:\sMac OS X.*$/.match?(line) - return true - end - end - end - - false -end - # detects if the hardware is 64-bit (evaluates to true in "WOW64" mode in a 32-bit app on a 64-bit system) def windows64? windows? && ( ENV["PROCESSOR_ARCHITECTURE"] == "AMD64" || ENV["PROCESSOR_ARCHITEW6432"] == "AMD64" ) |