aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/edit.rb
diff options
context:
space:
mode:
authorMax Howell2012-03-05 16:02:46 +0000
committerMax Howell2012-03-16 21:06:15 +0000
commitf10696e8abbf81cfa2413d21e0b8c007724367c8 (patch)
tree8ac0c909640ad630bcaecc7115e8053d941e8ee6 /Library/Homebrew/cmd/edit.rb
parent4247c60015d82d05bb88f9c32ae45e7b435edef8 (diff)
downloadhomebrew-f10696e8abbf81cfa2413d21e0b8c007724367c8.tar.bz2
`brew edit adamv/alt/ruby` works
The reason it didn't work is it doesn't use ARGV.formulae because it needs to be able to edit stuff that doesn't parse. Most other stuff already works because we are awesome.
Diffstat (limited to 'Library/Homebrew/cmd/edit.rb')
-rw-r--r--Library/Homebrew/cmd/edit.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb
index abaefbea8..06be636dc 100644
--- a/Library/Homebrew/cmd/edit.rb
+++ b/Library/Homebrew/cmd/edit.rb
@@ -17,7 +17,12 @@ module Homebrew extend self
else
# Don't use ARGV.formulae as that will throw if the file doesn't parse
paths = ARGV.named.map do |name|
- HOMEBREW_REPOSITORY+"Library/Formula/#{Formula.canonical_name name}.rb"
+ name = Formula.canonical_name name
+ if name.include? '/'
+ Pathname.new(name)
+ else
+ HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
+ end
end
unless ARGV.force?
paths.each do |path|