2024-08-09 18:18:09 +01:00
|
|
|
# typed: true # This cannot be `# typed: strict` due to the use of `undef`.
|
2022-11-21 22:08:11 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class FormulaInstaller
|
|
|
|
undef fresh_install?
|
|
|
|
|
|
|
|
sig { params(formula: Formula).returns(T.nilable(T::Boolean)) }
|
|
|
|
def fresh_install?(formula)
|
|
|
|
!Homebrew::EnvConfig.developer? &&
|
|
|
|
(!installed_as_dependency? || !formula.any_version_installed?)
|
|
|
|
end
|
|
|
|
end
|