formula, ARGV: don't output duplicate formulae.
If you specify a formula more than once or it exists in the Cellar with an alias name and the main name (e.g. `qt` and `qt5`) you can see the same formula showing up more than once. Instead, resolve these output lists of formulae such that they are unique based on their `name`. This doesn't use `full_name` as it's `name` that's use for the `Cellar`.
This commit is contained in:
parent
760a4601aa
commit
82f4413964
@ -44,7 +44,7 @@ module HomebrewArgvExtension
|
|||||||
else
|
else
|
||||||
Formulary.find_with_priority(name, spec)
|
Formulary.find_with_priority(name, spec)
|
||||||
end
|
end
|
||||||
end
|
end.uniq(&:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def resolved_formulae
|
def resolved_formulae
|
||||||
@ -79,7 +79,7 @@ module HomebrewArgvExtension
|
|||||||
f.follow_installed_alias = false
|
f.follow_installed_alias = false
|
||||||
|
|
||||||
f
|
f
|
||||||
end
|
end.uniq(&:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def casks
|
def casks
|
||||||
|
|||||||
@ -1406,7 +1406,7 @@ class Formula
|
|||||||
Formulary.from_rack(rack)
|
Formulary.from_rack(rack)
|
||||||
rescue FormulaUnavailableError, TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
|
rescue FormulaUnavailableError, TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
|
||||||
end
|
end
|
||||||
end.compact
|
end.compact.uniq(&:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.installed_with_alias_path(alias_path)
|
def self.installed_with_alias_path(alias_path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user