Skip to content
Snippets Groups Projects
Commit 40b1ba1c authored by Paul O'Neil's avatar Paul O'Neil Committed by Adam Vandenberg
Browse files

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 Homebrew/homebrew#1633
parent 3a97b2cf
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment