Skip to content

Commit

Permalink
dev-cmd/typecheck: Disallow --fix when in taps too
Browse files Browse the repository at this point in the history
- This could autocorrect files in Homebrew/brew when
  we should be targetting the tap, because of the
  weird hierarchy thing
  (Homebrew#18027 (comment)).

Co-authored-by: Bo Anderson <[email protected]>
  • Loading branch information
2 people authored and ctaintor committed Sep 4, 2024
1 parent 10d6249 commit c842ed1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Library/Homebrew/dev-cmd/typecheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit c842ed1

Please sign in to comment.