mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-16 14:26:53 -06:00
apply which to default editor values
this was lost during integration from Homebrew
This commit is contained in:
parent
6da1aee8fc
commit
dbfe0db2de
1 changed files with 4 additions and 2 deletions
|
|
@ -133,8 +133,10 @@ module Hbc::Utils
|
|||
end
|
||||
|
||||
def self.exec_editor(*args)
|
||||
editor = [ *ENV.values_at('HOMEBREW_EDITOR', 'VISUAL', 'EDITOR'),
|
||||
*%w{mate edit vim /usr/bin/vim} ].compact.first
|
||||
editor = [
|
||||
*ENV.values_at('HOMEBREW_EDITOR', 'VISUAL', 'EDITOR'),
|
||||
*%w{mate edit vim /usr/bin/vim}.map{ |x| which(x) }
|
||||
].compact.first.to_s
|
||||
exec(*editor.split.concat(args))
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue