mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Make MacOS.language
less opinionated.
This commit is contained in:
parent
7d31a70373
commit
1a25f1ec6d
@ -41,8 +41,12 @@ module OS
|
||||
version.to_sym
|
||||
end
|
||||
|
||||
def languages
|
||||
@languages ||= Utils.popen_read("defaults", "read", ".GlobalPreferences", "AppleLanguages").scan(/[^ \n"(),]+/)
|
||||
end
|
||||
|
||||
def language
|
||||
@language ||= Utils.popen_read("defaults", "read", ".GlobalPreferences", "AppleLanguages").delete(" \n\"()").sub(/,.*/, "")
|
||||
languages.first
|
||||
end
|
||||
|
||||
def active_developer_dir
|
||||
|
Loading…
x
Reference in New Issue
Block a user