From 5818b7871d08a6c9074ec08860803972d5ea6155 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 31 Mar 2021 09:21:18 +0100 Subject: [PATCH] github_packages: Fix org.opencontainers.image.source --- Library/Homebrew/github_packages.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index fd1e305bf5..ec5c4412b0 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -123,6 +123,7 @@ class GitHubPackages formula_name = bottle_hash["formula"]["name"] _, org, repo, = *bottle_hash["bottle"]["root_url"].match(URL_REGEX) + repo = "homebrew-#{repo}" unless HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX.match?(repo) version = bottle_hash["formula"]["pkg_version"] rebuild = if (rebuild = bottle_hash["bottle"]["rebuild"]).positive? @@ -139,8 +140,7 @@ class GitHubPackages git_path = bottle_hash["formula"]["tap_git_path"] git_revision = bottle_hash["formula"]["tap_git_revision"] - git_revision ||= "HEAD" - source = "https://github.com/#{org}/#{repo}/blob/#{git_revision}/#{git_path}" + source = "https://github.com/#{org}/#{repo}/blob/#{git_revision.presence || "HEAD"}/#{git_path}" formula_core_tap = formula_full_name.exclude?("/") documentation = if formula_core_tap