Fix brew edit foo

This commit is contained in:
Adam Vandenberg 2010-09-30 06:47:19 -07:00
parent 7adf1c80bd
commit 0305ee47a7

View File

@ -154,11 +154,11 @@ begin
"#{HOMEBREW_REPOSITORY}/bin/brew"<< "#{HOMEBREW_REPOSITORY}/bin/brew"<<
"#{HOMEBREW_REPOSITORY}/README.md" "#{HOMEBREW_REPOSITORY}/README.md"
else else
require 'formula'
# Don't use ARGV.formulae as that will throw if the file doesn't parse # Don't use ARGV.formulae as that will throw if the file doesn't parse
paths = ARGV.named.collect do |name| paths = ARGV.named.collect do |name|
path = "#{HOMEBREW_REPOSITORY}/Library/Formula/#{ARGV.resolve_alias(name)}.rb" path = Formula.path(Formula.resolve_alias(name))
unless File.exist? path unless File.exist? path
require 'formula'
raise FormulaUnavailableError, name raise FormulaUnavailableError, name
else else
path path