brew edit works if the file in question won't parse
This commit is contained in:
parent
57fc32d279
commit
fba0a5c5cd
13
bin/brew
13
bin/brew
@ -124,9 +124,18 @@ begin
|
||||
exec 'mate', *Dir["#{HOMEBREW_REPOSITORY}/Library/*"]<<
|
||||
"#{HOMEBREW_REPOSITORY}/bin/brew"<<
|
||||
"#{HOMEBREW_REPOSITORY}/README.md"
|
||||
else
|
||||
exec_editor *ARGV.formulae.collect {|f| f.path}
|
||||
else
|
||||
# we don't use ARGV.formulae as that will throw if the file doesn't parse
|
||||
paths = ARGV.named.collect do |name|
|
||||
unless File.exist? path = "#{HOMEBREW_REPOSITORY}/Library/Formula/#{name}.rb"
|
||||
require 'formula'
|
||||
raise FormulaUnavailableError, name
|
||||
else
|
||||
path
|
||||
end
|
||||
end
|
||||
exec_editor *paths
|
||||
end
|
||||
|
||||
when 'up', 'update'
|
||||
require 'update'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user