mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

- Found with `grep -rL "# typed: strict" Library/Homebrew | xargs grep -l "undef "`. - This stops people from trying to bump them and getting an error that they can't fix because [it's a Sorbet limitation](https://sorbet.org/docs/error-reference#3008), wasting contributor time.
13 lines
368 B
Ruby
13 lines
368 B
Ruby
# typed: true # This cannot be `# typed: strict` due to the use of `undef`.
|
|
# 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
|