diff options
| author | Jack Nagel | 2013-08-29 19:03:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-29 19:08:15 -0500 |
| commit | 905bb7c6c3b7f1fb0ab0fabaa6932cc560aa4adf (patch) | |
| tree | 866420bb706bd358886c8ee39ce8948753396484 /Library | |
| parent | cc01ace183dd46be7a17e275567c7e2a5e314c09 (diff) | |
| download | homebrew-905bb7c6c3b7f1fb0ab0fabaa6932cc560aa4adf.tar.bz2 | |
Allow conflicts_with to accept multiple formula names
Closes #22202.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index cd899d45c..cde6da4e4 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -712,8 +712,9 @@ class Formula @conflicts ||= [] end - def conflicts_with name, opts={} - conflicts << FormulaConflict.new(name, opts[:because]) + def conflicts_with *names + opts = Hash === names.last ? names.pop : {} + names.each { |name| conflicts << FormulaConflict.new(name, opts[:because]) } end def skip_clean *paths |
