aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/untap.rb
diff options
context:
space:
mode:
authorTsukasa OMOTO2014-04-24 11:26:45 +0900
committerJack Nagel2014-04-24 17:10:41 -0500
commit54004a4759fa660c4294c00f1b4708f514948250 (patch)
tree4894bf19db4c8aa4e51966f5dca0b7e8a5f423f6 /Library/Homebrew/cmd/untap.rb
parentfb27cbe6a71ec7bf1b555494d947cafaa03581d5 (diff)
downloadbrew-54004a4759fa660c4294c00f1b4708f514948250.tar.bz2
Make the on-disk representation of taps unambiguous
This commit supports "-" and "_" in names of user and repository. Closes Homebrew/homebrew#28203. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/untap.rb')
-rw-r--r--Library/Homebrew/cmd/untap.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb
index 77e8f8688..8d58e2a5b 100644
--- a/Library/Homebrew/cmd/untap.rb
+++ b/Library/Homebrew/cmd/untap.rb
@@ -13,14 +13,15 @@ module Homebrew extend self
user.downcase!
repo.downcase!
- tapd = HOMEBREW_LIBRARY/"Taps/#{user}-#{repo}"
+ tapd = HOMEBREW_LIBRARY/"Taps/#{user}/homebrew-#{repo}"
raise "No such tap!" unless tapd.directory?
files = []
- tapd.find_formula{ |file| files << Pathname.new("#{user}-#{repo}").join(file) }
+ tapd.find_formula{ |file| files << Pathname.new("#{user}/homebrew-#{repo}").join(file) }
unlink_tap_formula(files)
- rm_rf tapd
+ tapd.rmtree
+ tapd.dirname.rmdir_if_possible
puts "Untapped #{files.length} formula"
end