Skip to content
Snippets Groups Projects
Unverified Commit fe75934a authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #7730 from MikeMcQuaid/tap-fetch-name

tap: check for invalid fetched tap name.
parents 8107ac29 5acb5927
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,10 @@ class Tap
return CoreTap.instance if ["Homebrew", "Linuxbrew"].include?(user) && ["core", "homebrew"].include?(repo)
cache_key = "#{user}/#{repo}".downcase
cache.fetch(cache_key) { |key| cache[key] = Tap.new(user, repo) }
tap = cache.fetch(cache_key) { |key| cache[key] = Tap.new(user, repo) }
raise "Invalid tap name '#{args.join("/")}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
tap
end
def self.from_path(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment