Display skip-clean warning only before clean
Not anytime the formula loads.
This commit is contained in:
parent
a7946e0088
commit
5790f4b523
@ -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 ||= []
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user