aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2012-03-05 16:02:46 +0000
committerMax Howell2012-03-16 21:06:15 +0000
commita9587ff7d7b4cc65deeb7ab90f1ea7b0dd9223cf (patch)
tree74afebcc1db72dc5d064fac832cdf7da78e4855d
parent3f25dd60fa74034ade3a8136f072a7275a4feb87 (diff)
downloadbrew-a9587ff7d7b4cc65deeb7ab90f1ea7b0dd9223cf.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.
-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|