diff options
| author | Mike McQuaid | 2017-05-13 11:42:01 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2017-05-13 11:42:01 +0100 | 
| commit | 8205e61e6493f7c0a91c0311a321a80830f70bc3 (patch) | |
| tree | 99de15601ca526b829aac5884c2c9b2194e082d9 /Library/Homebrew/utils.rb | |
| parent | 459fef3b09b25d3e24cce6aa6f2e3a7bd5460a2b (diff) | |
| download | brew-8205e61e6493f7c0a91c0311a321a80830f70bc3.tar.bz2 | |
More environment filtering tweaks
- only document HOMEBREW_* variables in the manpage (although still
  read from all the original environment variables).
- resort manpage environment variables in alphabetical order
- check the original path for trailing slashes
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index c37633e41..28d7fc283 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -320,7 +320,7 @@ def which_all(cmd, path = ENV["PATH"])  end  def which_editor -  editor = ENV.values_at("HOMEBREW_EDITOR", "VISUAL").compact.reject(&:empty?).first +  editor = ENV.values_at("HOMEBREW_EDITOR", "HOMEBREW_VISUAL").compact.reject(&:empty?).first    if editor      editor_name, _, editor_args = editor.partition " "      editor_path = which(editor_name, ENV["HOMEBREW_PATH"]) @@ -356,7 +356,7 @@ def exec_editor(*args)  end  def exec_browser(*args) -  browser = ENV["HOMEBREW_BROWSER"] || ENV["BROWSER"] +  browser = ENV["HOMEBREW_BROWSER"]    browser ||= OS::PATH_OPEN if defined?(OS::PATH_OPEN)    return unless browser    safe_exec(browser, *args) | 
