diff --git a/Library/Homebrew/os/linux.rb b/Library/Homebrew/os/linux.rb index 96fbbb9037..94c510c821 100644 --- a/Library/Homebrew/os/linux.rb +++ b/Library/Homebrew/os/linux.rb @@ -15,6 +15,18 @@ module OS 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