diff options
| author | Adam Vandenberg | 2012-10-21 13:03:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-21 13:24:02 -0700 |
| commit | 4cbf036c17e9d71ed49950e5332d43cf9e7bfe5b (patch) | |
| tree | 9079ff5998053e9e59c43348fc2276b030f10919 | |
| parent | b25740d61c3df332d2ec5281be2c84fcd702560e (diff) | |
| download | brew-4cbf036c17e9d71ed49950e5332d43cf9e7bfe5b.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 |
