diff options
| author | Max Howell | 2009-07-29 00:56:22 +0100 |
|---|---|---|
| committer | Max Howell | 2009-07-29 01:00:26 +0100 |
| commit | 90c7029144d6441bd8594c7e5c843e3aee583ffb (patch) | |
| tree | f51567284c852a86c1ed6b50b4ea21ebad401ea9 /Library | |
| parent | e9cb539445cc452f08215b98b490a25b3cee3a76 (diff) | |
| download | brew-90c7029144d6441bd8594c7e5c843e3aee583ffb.tar.bz2 | |
Fix brew rm
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/keg.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 8330c650f..f724a068e 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -80,9 +80,13 @@ class Keg end def rm + # don't rmtree shit if we aren't positive about our location! + raise "Bad stuff!" unless path.parent.parent == $cellar + if path.directory? FileUtils.chmod_R 0777, path # ensure we have permission to delete - path.rmtree + path.rmtree # $cellar/foo/1.2.0 + path.parent.rmdir if path.parent.children.length == 0 # $cellar/foo end end |
