brew/Library/Homebrew/os/linux.rb

43 lines
819 B
Ruby
Raw Normal View History

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
raise "Loaded OS::Linux on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]
def version
Version::NULL
end
def full_version
Version::NULL
end
def languages
@languages ||= [
*ARGV.value("language")&.split(","),
*ENV["HOMEBREW_LANGUAGES"]&.split(","),
*ENV["LANG"]&.slice(/[a-z]+/),
].uniq
end
def language
languages.first
end
module Xcode
module_function
def version
Version::NULL
end
end
end
end