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
  (#18027 (comment)).

Co-authored-by: Bo Anderson <[email protected]>
  • Loading branch information
issyl0 and Bo98 committed Aug 17, 2024
1 parent feedc5c commit 4e37436
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?

Check warning on line 47 in Library/Homebrew/dev-cmd/typecheck.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/dev-cmd/typecheck.rb#L47

Added line #L47 was not covered by tests
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 4e37436

Please sign in to comment.