File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -320,15 +320,15 @@ def which_all(cmd, path = ENV["PATH"])
320320end
321321
322322def which_editor
323- editor = ENV . values_at ( "HOMEBREW_EDITOR" , "VISUAL" ) . compact . first
323+ editor = ENV . values_at ( "HOMEBREW_EDITOR" , "VISUAL" ) . compact . reject ( & :empty? ) . first
324324 return which ( editor , ENV [ "HOMEBREW_PATH" ] ) unless editor . nil?
325325
326326 # Find Textmate
327- editor = "mate" if which "mate"
327+ editor = which ( "mate" , ENV [ "HOMEBREW_PATH" ] )
328328 # Find BBEdit / TextWrangler
329- editor ||= "edit" if which "edit"
329+ editor ||= which ( "edit" , ENV [ "HOMEBREW_PATH" ] )
330330 # Find vim
331- editor ||= "vim" if which "vim"
331+ editor ||= which ( "vim" , ENV [ "HOMEBREW_PATH" ] )
332332 # Default to standard vim
333333 editor ||= "/usr/bin/vim"
334334
You can’t perform that action at this time.
0 commit comments