formula_installer: fix forbidden license check
Convert forbidden licenses to a string before duplicating to have empty strings instead of `nil`.
This commit is contained in:
parent
b06bcf3db1
commit
42d75c2787
@ -1139,7 +1139,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def forbidden_license_check
|
def forbidden_license_check
|
||||||
forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.dup
|
forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.to_s.dup
|
||||||
SPDX::ALLOWED_LICENSE_SYMBOLS.each do |s|
|
SPDX::ALLOWED_LICENSE_SYMBOLS.each do |s|
|
||||||
pattern = /#{s.to_s.tr("_", " ")}/i
|
pattern = /#{s.to_s.tr("_", " ")}/i
|
||||||
forbidden_licenses.sub!(pattern, s.to_s)
|
forbidden_licenses.sub!(pattern, s.to_s)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user