Display skip-clean warning only before clean

Not anytime the formula loads.
This commit is contained in:
Max Howell 2012-08-29 15:43:28 -04:00
parent a7946e0088
commit 5790f4b523
2 changed files with 9 additions and 5 deletions

View File

@ -678,11 +678,7 @@ private
def skip_clean paths
if paths == :all
opoo "skip_clean :all is deprecated"
puts "Skip clean was commonly used to prevent brew from stripping binaries."
puts "brew no longer strips binaries, if skip_clean is required to prevent"
puts "brew from removing empty directories, you should specify exact paths"
puts "in the formula."
@skip_clean_all = true
return
end
@skip_clean_paths ||= []

View File

@ -294,6 +294,14 @@ class FormulaInstaller
end
def clean
if f.class.skip_clean_all?
opoo "skip_clean :all is deprecated"
puts "Skip clean was commonly used to prevent brew from stripping binaries."
puts "brew no longer strips binaries, if skip_clean is required to prevent"
puts "brew from removing empty directories, you should specify exact paths"
puts "in the formula."
return
end
require 'cleaner'
Cleaner.new f
rescue Exception => e