small refactor to check env variable within function
This commit is contained in:
parent
c855429612
commit
5449904dde
@ -259,7 +259,7 @@ module Homebrew
|
||||
|
||||
formulae.each do |f|
|
||||
Migrator.migrate_if_needed(f)
|
||||
forbidden_license_check(f) unless ENV["HOMEBREW_FORBIDDEN_LICENSES"].blank?
|
||||
forbidden_license_check(f)
|
||||
install_formula(f)
|
||||
Cleanup.install_formula_clean!(f)
|
||||
end
|
||||
@ -348,6 +348,8 @@ module Homebrew
|
||||
end
|
||||
|
||||
def forbidden_license_check(f)
|
||||
return if ENV["HOMEBREW_FORBIDDEN_LICENSES"].blank?
|
||||
|
||||
forbidden_licenses = env_forbidden_licenses
|
||||
|
||||
if forbidden_licenses.include? f.license
|
||||
|
||||
@ -149,7 +149,7 @@ class FormulaInstaller
|
||||
def prelude
|
||||
Tab.clear_cache
|
||||
verify_deps_exist unless ignore_deps?
|
||||
Homebrew.forbidden_license_check(formula) unless ENV["HOMEBREW_FORBIDDEN_LICENSES"].blank?
|
||||
Homebrew.forbidden_license_check(formula)
|
||||
|
||||
check_install_sanity
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user