aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorMike McQuaid2016-12-31 17:03:29 +0000
committerMike McQuaid2016-12-31 17:03:29 +0000
commit82f441396422b44c5f293e2b6597163de2349733 (patch)
tree51ca9eeeb630923b965c406045872fae667ec835 /Library/Homebrew/extend
parent760a4601aa07e993c0ccb9ef01257da7361016e1 (diff)
downloadbrew-82f441396422b44c5f293e2b6597163de2349733.tar.bz2
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`.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ARGV.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index d361a99a8..767ddc6e3 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -44,7 +44,7 @@ module HomebrewArgvExtension
else
Formulary.find_with_priority(name, spec)
end
- end
+ end.uniq(&:name)
end
def resolved_formulae
@@ -79,7 +79,7 @@ module HomebrewArgvExtension
f.follow_installed_alias = false
f
- end
+ end.uniq(&:name)
end
def casks