aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-10-21 13:03:35 -0700
committerAdam Vandenberg2012-10-21 13:24:02 -0700
commit4cbf036c17e9d71ed49950e5332d43cf9e7bfe5b (patch)
tree9079ff5998053e9e59c43348fc2276b030f10919 /Library
parentb25740d61c3df332d2ec5281be2c84fcd702560e (diff)
downloadbrew-4cbf036c17e9d71ed49950e5332d43cf9e7bfe5b.tar.bz2
Allow varags to skip_clean
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 8f63cd705..4339c471d 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -746,14 +746,18 @@ private
dependencies.add ConflictRequirement.new(formula, message)
end
- def skip_clean paths
- if paths == :all
+ def skip_clean *paths
+ paths = [paths].flatten
+
+ # :all is deprecated though
+ if paths.include? :all
@skip_clean_all = true
return
end
+
@skip_clean_paths ||= []
- [paths].flatten.each do |p|
- p = p.to_s unless p == :la
+ paths.each do |p|
+ p = p.to_s unless p == :la # Keep :la in paths as a symbol
@skip_clean_paths << p unless @skip_clean_paths.include? p
end
end