From 4cbf036c17e9d71ed49950e5332d43cf9e7bfe5b Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 21 Oct 2012 13:03:35 -0700 Subject: Allow varags to skip_clean --- Library/Homebrew/formula.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3