From c874b4e4c2590cbb775583892f18ecdc96ca897c Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 15 Sep 2016 16:01:59 +0100 Subject: [PATCH] install: don't install alias if already installed --- Library/Homebrew/cmd/install.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 99cb753530..fdaf68d535 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -133,9 +133,14 @@ module Homebrew raise "No devel block is defined for #{f.full_name}" end - if f.installed? - msg = "#{f.full_name}-#{f.installed_version} already installed" - msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only? + current = f if f.installed? + current ||= f.old_installed_formulae.first + + if current + msg = "#{current.full_name}-#{current.installed_version} already installed" + unless current.linked_keg.symlink? || current.keg_only? + msg << ", it's just not linked" + end opoo msg elsif f.migration_needed? && !ARGV.force? # Check if the formula we try to install is the same as installed