aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-07-09 20:12:53 -0500
committerJack Nagel2013-07-09 20:12:53 -0500
commit81984411b0d9d4295b4782a9490bee928f460155 (patch)
treeb199c316ea839db9a07b056ab091e8c23741dd34 /Library/Homebrew
parenta90ec1ae80a4cf33fcff66be1830c603b6fddf16 (diff)
downloadbrew-81984411b0d9d4295b4782a9490bee928f460155.tar.bz2
Respect $VISUAL when picking an editor
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/utils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 5b055d8f1..800ec0544 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -171,7 +171,7 @@ def which cmd
end
def which_editor
- editor = ENV['HOMEBREW_EDITOR'] || ENV['EDITOR']
+ editor = ENV.values_at('HOMEBREW_EDITOR', 'VISUAL', 'EDITOR').compact.first
# If an editor wasn't set, try to pick a sane default
return editor unless editor.nil?