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

- This was done with `brew typecheck --update --suggest-typed` which (as of the previous commit) uses Spoom, yet another gem. I thought I'd see how well it works. There are no Sorbet errors after these changes!
18 lines
396 B
Ruby
18 lines
396 B
Ruby
# typed: true
|
|
# frozen_string_literal: true
|
|
|
|
module Homebrew
|
|
module CLI
|
|
class Args
|
|
undef only_formula_or_cask
|
|
|
|
def only_formula_or_cask
|
|
# Make formula the default on linux for non-developers
|
|
return :formula unless Homebrew::EnvConfig.developer?
|
|
return :formula if formula? && !cask?
|
|
return :cask if cask? && !formula?
|
|
end
|
|
end
|
|
end
|
|
end
|