formula_installer: skip linking formulae with already installed casks.
If you have the `emacs` or `docker` formulae and casks both installed the formula will fail to link. Skip trying to link the formula if the cask is already installed. Fixes https://github.com/Homebrew/homebrew-core/issues/36310.
This commit is contained in:
parent
2cc50864cc
commit
6f184ea0dd
@ -793,6 +793,17 @@ class FormulaInstaller
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
cask_installed_with_formula_name = begin
|
||||||
|
Cask::CaskLoader.load(formula.name).installed?
|
||||||
|
rescue Cask::CaskUnavailableError
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
if cask_installed_with_formula_name
|
||||||
|
ohai "#{formula.name} cask is installed, skipping link."
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if keg.linked?
|
if keg.linked?
|
||||||
opoo "This keg was marked linked already, continuing anyway"
|
opoo "This keg was marked linked already, continuing anyway"
|
||||||
keg.remove_linked_keg_record
|
keg.remove_linked_keg_record
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user