aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-08-29 15:43:28 -0400
committerMax Howell2012-08-29 15:43:28 -0400
commit92a4981541db8f363db471bf1dfb03b2540e4c52 (patch)
tree5e7d66401f9670adbf5eae82b4f44c3c71bfbf38 /Library
parenta96686ab33a68ee445017923898a8a33c97d4d66 (diff)
downloadhomebrew-92a4981541db8f363db471bf1dfb03b2540e4c52.tar.bz2
Display skip-clean warning only before clean
Not anytime the formula loads.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb6
-rw-r--r--Library/Homebrew/formula_installer.rb8
2 files changed, 9 insertions, 5 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 2c3345256..08e01a7d7 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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 ||= []
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 6e1f59633..808f5c162 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -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