Skip to content

Commit

Permalink
Merge pull request #15849 from razvanazamfirei/sharding-audit
Browse files Browse the repository at this point in the history
cask/audit: audit for appropriate sharding directory
  • Loading branch information
MikeMcQuaid authored Aug 9, 2023
2 parents f4f170c + 72df964 commit 1a8f1be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,17 @@ def audit_https_availability
strict: strict?)
end

sig { void }
def audit_cask_path
return if cask.tap != "homebrew/cask"

expected_path = cask.tap.new_cask_path(cask.token)

return if cask.sourcefile_path.to_s.end_with?(expected_path)

add_error "Cask should be located in '#{expected_path}'"
end

# sig {
# params(url_to_check: T.any(String, URL), url_type: String, cask_token: String, tap: Tap,
# options: T.untyped).void
Expand Down

0 comments on commit 1a8f1be

Please sign in to comment.