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
This commit is contained in:
parent
3a97b2cf67
commit
40b1ba1c29
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user