diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index c90a229f74..b97a79fbc9 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -331,14 +331,14 @@ module Homebrew def audit_license if formula.license.present? non_standard_licenses = [] - formula.license.each do |lic| - next if @spdx_data["licenses"].any? { |standard_lic| standard_lic["licenseId"] == lic } + formula.license.each do |license| + next if @spdx_data["licenses"].any? { |spdx| spdx["licenseId"] == license } - non_standard_licenses << lic + non_standard_licenses << license end if non_standard_licenses.present? - problem "Formula #{formula.name} contains non standard SPDX license: #{non_standard_licenses}." + problem "Formula #{formula.name} contains non-standard SPDX licenses: #{non_standard_licenses}." end return unless @online diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index bd87da7562..ab4734cf57 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2215,7 +2215,7 @@ class Formula if args.nil? @licenses else - @licenses = Array(args) unless args == "" + @licenses = Array(args) end end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 7d7938a8fb..a288fa5f3e 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1131,7 +1131,7 @@ class FormulaInstaller end return if @only_deps - return unless formula.license.all? { |lic| forbidden_licenses.include? lic } + return unless formula.license.all? { |license| forbidden_licenses.include? license } raise CannotInstallFormulaError, <<~EOS #{formula.name}'s licenses are all forbidden: #{formula.license}.