aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-02-28 16:51:15 -0600
committerJack Nagel2014-02-28 16:51:15 -0600
commit7700b710eba54de2ab266bd599e1d54fe0330564 (patch)
tree1a1ac94337ebfbf58049f5c3d31d2d3937c4d511
parent15294493e2f94f233f738a4c6d772610d00edaa3 (diff)
downloadhomebrew-7700b710eba54de2ab266bd599e1d54fe0330564.tar.bz2
Use Formula.path
-rw-r--r--Library/Homebrew/cmd/edit.rb2
-rw-r--r--Library/Homebrew/cmd/install.rb2
-rw-r--r--Library/Homebrew/cmd/log.rb2
-rw-r--r--Library/Homebrew/formula.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb
index 4e3298c3f..4389087d4 100644
--- a/Library/Homebrew/cmd/edit.rb
+++ b/Library/Homebrew/cmd/edit.rb
@@ -30,7 +30,7 @@ module Homebrew extend self
if name.include? '/'
Pathname.new(name)
else
- HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
+ Formula.path(name)
end
end
unless ARGV.force?
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 4e1705c74..cd3c3c8d2 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -25,7 +25,7 @@ module Homebrew extend self
ARGV.named.each do |name|
# if a formula has been tapped ignore the blacklisting
- if not File.file? HOMEBREW_REPOSITORY/"Library/Formula/#{name}.rb"
+ unless Formula.path(name).file?
msg = blacklisted? name
raise "No available formula for #{name}\n#{msg}" if msg
end
diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb
index 5f0ef63c8..ca005d553 100644
--- a/Library/Homebrew/cmd/log.rb
+++ b/Library/Homebrew/cmd/log.rb
@@ -8,7 +8,7 @@ module Homebrew extend self
path = ARGV.formulae.first.path.realpath
rescue FormulaUnavailableError
# Maybe the formula was deleted
- path = HOMEBREW_REPOSITORY/"Library/Formula/#{ARGV.named.first}.rb"
+ path = Formula.path(ARGV.named.first)
end
cd path.dirname # supports taps
exec "git", "log", *ARGV.options_only + ["--", path]
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 141f12636..c632fba2e 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -403,7 +403,7 @@ class Formula
end
# test if the name is a core formula
- formula_with_that_name = Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name}.rb")
+ formula_with_that_name = Formula.path(name)
if formula_with_that_name.file? and formula_with_that_name.readable?
return name
end