From 4e37436c3a3c9f53897c54db766cf101d1fdb841 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 17 Aug 2024 21:47:42 +0100 Subject: [PATCH] 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 --- Library/Homebrew/dev-cmd/typecheck.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index 86b1d15a036e3..de22b26b1545c 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -46,6 +46,8 @@ class Typecheck < AbstractCommand 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?