diff options
| author | Max Howell | 2012-08-29 15:43:28 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 15:43:28 -0400 |
| commit | 5790f4b523c47b8643408e83b7f92a4d68041eae (patch) | |
| tree | 077f279b281ff69ac75b3369f532129180e818d8 /Library | |
| parent | a7946e0088185ff852babc657d5ccf1b57851575 (diff) | |
| download | brew-5790f4b523c47b8643408e83b7f92a4d68041eae.tar.bz2 | |
Display skip-clean warning only before clean
Not anytime the formula loads.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 8 |
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 |
