Merge pull request #17311 from bevanjkay/cask-sharding-fix
cask/audit: fix sharding for font-* casks
This commit is contained in:
commit
1fac68348a
@ -817,11 +817,7 @@ module Cask
|
||||
def audit_cask_path
|
||||
return unless cask.tap.core_cask_tap?
|
||||
|
||||
expected_path = if cask.artifacts.any?(Artifact::Font)
|
||||
cask.tap.new_cask_font_path(cask.token)
|
||||
else
|
||||
cask.tap.new_cask_path(cask.token)
|
||||
end
|
||||
expected_path = cask.tap.new_cask_path(cask.token)
|
||||
|
||||
return if cask.sourcefile_path.to_s.end_with?(expected_path)
|
||||
|
||||
|
@ -1397,14 +1397,11 @@ class CoreCaskTap < AbstractCoreTap
|
||||
|
||||
sig { params(token: String).returns(Pathname) }
|
||||
def new_cask_path(token)
|
||||
cask_subdir = token[0].to_s
|
||||
cask_dir/cask_subdir/"#{token.downcase}.rb"
|
||||
cask_subdir = if token.start_with?("font-")
|
||||
"font/font-#{token.delete_prefix("font-")[0]}"
|
||||
else
|
||||
token[0].to_s
|
||||
end
|
||||
|
||||
sig { params(token: String).returns(Pathname) }
|
||||
def new_cask_font_path(token)
|
||||
font_first_letter = T.must(token.split("font-").second)[0].to_s
|
||||
cask_subdir = "font/font-#{font_first_letter}"
|
||||
cask_dir/cask_subdir/"#{token.downcase}.rb"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user