dev-cmd/typecheck: Disallow --fix when in taps too

- This could autocorrect files in Homebrew/brew when
  we should be targetting the tap, because of the
  weird hierarchy thing
  (https://github.com/Homebrew/brew/pull/18027#issuecomment-2294896044).

Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
Issy Long 2024-08-17 21:47:42 +01:00
parent feedc5c84e
commit 4e37436c3a
No known key found for this signature in database

View File

@ -46,6 +46,8 @@ module Homebrew
def run
if (args.dir.present? || args.file.present?) && args.named.present?
raise UsageError, "Cannot use `--dir` or `--file` when specifying a tap."
elsif args.fix? && args.named.present?
raise UsageError, "Cannot use `--fix` when specifying a tap."
end
update = args.update? || args.update_all?