aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os.rb
blob: 93df62b7d9e32eb8f9612c330426aedf91df387d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module OS
  def self.mac?
    /darwin/i === RUBY_PLATFORM
  end

  def self.linux?
    /linux/i === RUBY_PLATFORM
  end

  if OS.mac?
    ISSUES_URL = "https://git.io/brew-troubleshooting"
    PATH_OPEN = "/usr/bin/open"
  elsif OS.linux?
    ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting"
    PATH_OPEN = "xdg-open"
  else
    raise "Unknown operating system"
  end
end