diff options
| author | Jack Nagel | 2013-08-29 19:03:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-29 19:08:15 -0500 |
| commit | b3f0b9f7b9af7a320cb7055c36bb1e0b50603afb (patch) | |
| tree | 76aaccde94324ee20fc5705e744a940dc71db060 /Library | |
| parent | 1900b70bd6bc0ead60bf536b01cece3f02ba82f3 (diff) | |
| download | brew-b3f0b9f7b9af7a320cb7055c36bb1e0b50603afb.tar.bz2 | |
Allow conflicts_with to accept multiple formula names
Closes Homebrew/homebrew#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 |
