formula_installer: move deprecation/disabled checking earlier
This commit is contained in:
parent
a59d07760f
commit
929d2d8caf
@ -179,6 +179,24 @@ class FormulaInstaller
|
|||||||
|
|
||||||
sig { void }
|
sig { void }
|
||||||
def prelude
|
def prelude
|
||||||
|
type, reason = DeprecateDisable.deprecate_disable_info formula
|
||||||
|
if type.present?
|
||||||
|
case type
|
||||||
|
when :deprecated
|
||||||
|
if reason.present?
|
||||||
|
opoo "#{formula.full_name} has been deprecated because it #{reason}!"
|
||||||
|
else
|
||||||
|
opoo "#{formula.full_name} has been deprecated!"
|
||||||
|
end
|
||||||
|
when :disabled
|
||||||
|
if reason.present?
|
||||||
|
raise CannotInstallFormulaError, "#{formula.full_name} has been disabled because it #{reason}!"
|
||||||
|
end
|
||||||
|
|
||||||
|
raise CannotInstallFormulaError, "#{formula.full_name} has been disabled!"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Tab.clear_cache
|
Tab.clear_cache
|
||||||
verify_deps_exist unless ignore_deps?
|
verify_deps_exist unless ignore_deps?
|
||||||
forbidden_license_check
|
forbidden_license_check
|
||||||
@ -248,25 +266,6 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
type, reason = DeprecateDisable.deprecate_disable_info formula
|
|
||||||
|
|
||||||
if type.present?
|
|
||||||
case type
|
|
||||||
when :deprecated
|
|
||||||
if reason.present?
|
|
||||||
opoo "#{formula.full_name} has been deprecated because it #{reason}!"
|
|
||||||
else
|
|
||||||
opoo "#{formula.full_name} has been deprecated!"
|
|
||||||
end
|
|
||||||
when :disabled
|
|
||||||
if reason.present?
|
|
||||||
raise CannotInstallFormulaError, "#{formula.full_name} has been disabled because it #{reason}!"
|
|
||||||
end
|
|
||||||
|
|
||||||
raise CannotInstallFormulaError, "#{formula.full_name} has been disabled!"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return if ignore_deps?
|
return if ignore_deps?
|
||||||
|
|
||||||
if Homebrew::EnvConfig.developer?
|
if Homebrew::EnvConfig.developer?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user