diff options
| -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"] | 
