diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index e4ec708c0b..41d31be6a9 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -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 diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 7a9da2a595..73f452eca0 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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