diff options
| author | Adam Vandenberg | 2012-10-21 13:03:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-21 13:24:02 -0700 |
| commit | 710b90748717aebf457ae790267cdd408c98462c (patch) | |
| tree | c0d0764cdef5b3b7ad571e0cf0d71a5a46fefc82 | |
| parent | 4e617d2400747b1375e1805e69dd5134cd6b69b2 (diff) | |
| download | homebrew-710b90748717aebf457ae790267cdd408c98462c.tar.bz2 | |
Allow varags to skip_clean
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 |
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 |
