mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
install: don't install alias if already installed
This commit is contained in:
parent
2a683f2569
commit
c874b4e4c2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user