diff options
| author | Paul O'Neil | 2010-06-17 09:41:33 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-18 21:11:43 -0700 |
| commit | 344cb2f710f8d5ade603180ccd9d71882fefa481 (patch) | |
| tree | 41054f73a9632fd4f8f2fd21f66e8607e530fa97 /Library | |
| parent | 9b80e519c4ad0c3877a364a2ff1c3281ea25f5c7 (diff) | |
| download | homebrew-344cb2f710f8d5ade603180ccd9d71882fefa481.tar.bz2 | |
cleans only existing directories
The previous code works fine on ruby 1.8.x, but under 1.9 trying
find on a non-existent folder gives:
==> No such file or directory
/usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/1.9.1/find.rb:38:in `block in find'
Fixes #1633
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.h.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 9e25bfb93..4c733b7c5 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -478,9 +478,7 @@ end class Cleaner def initialize f @f=f - - [f.bin, f.sbin, f.lib].each {|d| clean_dir d} - + [f.bin, f.sbin, f.lib].select{|d|d.exist?}.each{|d|clean_dir d} # info pages suck info = f.share+'info' info.rmtree if info.directory? and not f.skip_clean? info |
