diff options
| author | Mike McQuaid | 2017-07-27 15:31:19 +0100 |
|---|---|---|
| committer | GitHub | 2017-07-27 15:31:19 +0100 |
| commit | 0b78a7f884fe42b957bc759da3a45a67b8ebc86e (patch) | |
| tree | 9df20f1d822c84eddb472bae8a8464b7748812f5 /Library | |
| parent | 5b39768aca492f8d26cb466a327524a4bdcd19f6 (diff) | |
| parent | d6dd63d1a04cad16d2a6faa17a6d71e4baa8f95f (diff) | |
| download | brew-0b78a7f884fe42b957bc759da3a45a67b8ebc86e.tar.bz2 | |
Merge pull request #2951 from bfontaine/s/ruby_platform/rbconfig
OS: use RbConfig instead of RUBY_PLATFORM
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/os.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index dae843407..1209028a7 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -1,12 +1,14 @@ +require "rbconfig" + module OS def self.mac? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] - RUBY_PLATFORM.to_s.downcase.include? "darwin" + RbConfig::CONFIG["host_os"].include? "darwin" end def self.linux? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] - RUBY_PLATFORM.to_s.downcase.include? "linux" + RbConfig::CONFIG["host_os"].include? "linux" end ::OS_VERSION = ENV["HOMEBREW_OS_VERSION"] |
