From ccfc1be6fe24da32108c2db2795d93074090bf2f Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 27 Mar 2023 09:39:18 -0700 Subject: [PATCH] Rename lvar --- Library/Homebrew/formulary.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 5233478d0d..6724e6db7e 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -500,10 +500,11 @@ module Formulary def load_file(flags:, ignore_errors:) if @from != :formula_installer - if (md = url.match(%r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?[\w+-.@]+).rb})) + match = url.match(%r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?[\w+-.@]+).rb}) + if match raise UnsupportedInstallationMethod, - "Installation of #{md[:name]} from a GitHub commit URL is unsupported! " \ - "`brew extract #{md[:name]}` to a stable tap on GitHub instead." + "Installation of #{match[:name]} from a GitHub commit URL is unsupported! " \ + "`brew extract #{match[:name]}` to a stable tap on GitHub instead." elsif url.match?(%r{^(https?|ftp)://}) raise UnsupportedInstallationMethod, "Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \