BuildOptions: store option tuples in a Set
As options are stored in an object owned by the eigenclass of a formula, options defined in the Formula#options method can be added multiple times if the formula is instantiated multiple times. Store them in a set to prevent duplicates. Fixes Homebrew/homebrew#14133. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
c9f824b54a
commit
0549a9ab05
@ -162,7 +162,7 @@ class BuildOptions
|
||||
@args = Array.new(args)
|
||||
# Extend it into an ARGV extension
|
||||
@args.extend(HomebrewArgvExtension)
|
||||
@options = []
|
||||
@options = Set.new
|
||||
end
|
||||
|
||||
def add name, description=nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user