diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-24 10:21:14 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-24 10:21:14 -0700 |
commit | d3e4e565fdf7c210acfd8efd0de6b674883a5e0f (patch) | |
tree | 5fd2f1b237e39c81d8a7b54e0cdc0279e7528435 /spec/support/platform_helpers.rb | |
parent | 17014504259f8ccb19d782bd3b63b24657e4c9ca (diff) | |
parent | 157852156703daf96366dd773903147baf0292d9 (diff) | |
download | chef-12.2.0.rc.0.tar.gz |
Merge pull request #3128 from chef/jdm/prepare-12.2.012.2.0.rc.0
prepare 12.2.0 RC 0
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r-- | spec/support/platform_helpers.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index a412fe38e1..da0313758b 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -88,6 +88,20 @@ def mac_osx_106? false end +def mac_osx? + if File.exists? "/usr/bin/sw_vers" + result = ShellHelpers.shell_out("/usr/bin/sw_vers") + result.stdout.each_line do |line| + if line =~ /^ProductName:\sMac OS X.*$/ + 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' ) |