Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cask#full_name: properly output Homebrew org names #16328

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def audit_https_availability

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

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

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def timestamped_versions(caskroom_path: self.caskroom_path)

def full_name
return token if tap.nil?
return token if tap.user == "Homebrew"
return token if tap.core_cask_tap?

"#{tap.name}/#{token}"
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/livecheck/livecheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def load_other_tap_strategies(formulae_and_casks_to_check)
other_taps = {}
formulae_and_casks_to_check.each do |formula_or_cask|
next if formula_or_cask.tap.blank?
next if formula_or_cask.tap.name == CoreTap.instance.name
next if formula_or_cask.tap.name == "homebrew/cask"
next if formula_or_cask.tap.core_tap?
next if formula_or_cask.tap.core_cask_tap?
next if other_taps[formula_or_cask.tap.name]

other_taps[formula_or_cask.tap.name] = formula_or_cask.tap
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/test/cask/audit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def tmp_cask(name, text)
let(:cask_token) { "token-beta" }

it "fails if the cask is from an official tap" do
allow(cask).to receive(:tap).and_return(Tap.fetch("homebrew/cask"))
allow(cask).to receive(:tap).and_return(CoreCaskTap.instance)

expect(run).to error_with(/token contains version designation/)
end
Expand Down Expand Up @@ -369,7 +369,7 @@ def tmp_cask(name, text)

context "when cask token is in tap_migrations.json and" do
let(:cask_token) { "token-migrated" }
let(:tap) { Tap.fetch("homebrew/cask") }
let(:tap) { CoreCaskTap.instance }

before do
allow(tap).to receive(:tap_migrations).and_return({ cask_token => "homebrew/core" })
Expand Down