Move this code into FormulaInstaller
The correct location for it IMO. Also added warning for the user.
This commit is contained in:
parent
61a8bd9ca0
commit
2431c00c92
@ -105,7 +105,6 @@ module Homebrew extend self
|
||||
fi = FormulaInstaller.new(f)
|
||||
fi.install
|
||||
fi.caveats
|
||||
f.linked_keg.unlink if f.linked_keg.directory? and f.linked_keg.realpath == f.prefix
|
||||
fi.finish
|
||||
rescue FormulaAlreadyInstalledError => e
|
||||
opoo e.message
|
||||
|
||||
@ -158,6 +158,12 @@ class FormulaInstaller
|
||||
end
|
||||
|
||||
def link
|
||||
if f.linked_keg.directory? and f.linked_keg.realpath == f.prefix
|
||||
opoo "This keg was marked linked already, continuing anyway"
|
||||
# otherwise Keg.link will bail
|
||||
f.linked_keg.unlink
|
||||
end
|
||||
|
||||
Keg.new(f.prefix).link
|
||||
rescue Exception => e
|
||||
onoe "The linking step did not complete successfully"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user