2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-20 11:13:13 -08:00
|
|
|
module OS
|
|
|
|
# Define OS::Mac on Linux for formula API compatibility.
|
|
|
|
module Mac
|
|
|
|
module_function
|
|
|
|
|
2019-04-19 21:46:20 +09:00
|
|
|
# rubocop:disable Naming/ConstantName
|
|
|
|
# rubocop:disable Style/MutableConstant
|
|
|
|
::MacOS = self
|
|
|
|
# rubocop:enable Naming/ConstantName
|
|
|
|
# rubocop:enable Style/MutableConstant
|
2018-02-20 11:13:13 -08:00
|
|
|
|
2018-08-13 23:38:48 -07:00
|
|
|
raise "Loaded OS::Linux on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
|
|
|
|
2018-02-20 11:13:13 -08:00
|
|
|
def version
|
|
|
|
Version::NULL
|
|
|
|
end
|
|
|
|
|
|
|
|
def full_version
|
|
|
|
Version::NULL
|
|
|
|
end
|
|
|
|
|
2019-03-26 17:14:12 -04:00
|
|
|
def languages
|
|
|
|
@languages ||= [
|
|
|
|
*ARGV.value("language")&.split(","),
|
|
|
|
*ENV["HOMEBREW_LANGUAGES"]&.split(","),
|
|
|
|
*ENV["LANG"]&.slice(/[a-z]+/),
|
|
|
|
].uniq
|
|
|
|
end
|
|
|
|
|
|
|
|
def language
|
|
|
|
languages.first
|
|
|
|
end
|
|
|
|
|
2018-02-20 11:13:13 -08:00
|
|
|
module Xcode
|
|
|
|
module_function
|
|
|
|
|
|
|
|
def version
|
|
|
|
Version::NULL
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|