File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ def esc(code)
191191 ENV [ "HOMEBREW_EDITOR" ] = "vemate"
192192 ENV [ "HOMEBREW_PATH" ] = dir
193193
194- editor = dir / " vemate"
194+ editor = " #{ dir } / vemate"
195195 FileUtils . touch editor
196196 FileUtils . chmod 0755 , editor
197197
Original file line number Diff line number Diff line change @@ -321,7 +321,16 @@ def which_all(cmd, path = ENV["PATH"])
321321
322322def which_editor
323323 editor = ENV . values_at ( "HOMEBREW_EDITOR" , "VISUAL" ) . compact . reject ( &:empty? ) . first
324- return which ( editor , ENV [ "HOMEBREW_PATH" ] ) unless editor . nil?
324+ if editor
325+ editor_name , _ , editor_args = editor . partition " "
326+ editor_path = which ( editor_name , ENV [ "HOMEBREW_PATH" ] )
327+ editor = if editor_args . to_s . empty?
328+ editor_path . to_s
329+ else
330+ "#{ editor_path } #{ editor_args } "
331+ end
332+ return editor
333+ end
325334
326335 # Find Textmate
327336 editor = which ( "mate" , ENV [ "HOMEBREW_PATH" ] )
@@ -338,7 +347,7 @@ def which_editor
338347 or HOMEBREW_EDITOR to your preferred text editor.
339348 EOS
340349
341- editor
350+ editor . to_s
342351end
343352
344353def exec_editor ( *args )
You can’t perform that action at this time.
0 commit comments