diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 4e8da3c24..f78fbfcb7 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -337,6 +337,14 @@ ensure ENV["PATH"] = old_path end +def with_custom_locale(locale) + old_locale = ENV["LC_ALL"] + ENV["LC_ALL"] = locale + yield +ensure + ENV["LC_ALL"] = old_locale +end + def run_as_not_developer(&_block) old = ENV.delete "HOMEBREW_DEVELOPER" yield |
