test: require non-keg-only formulae to be linked.

This can be overridden with `--force`.

As mentioned in:
https://github.com/Homebrew/homebrew-core/pull/14525#issuecomment-307838164
This commit is contained in:
Mike McQuaid 2017-06-23 17:42:09 +01:00
parent 8a5f12076b
commit 7d5cce569d

View File

@ -39,6 +39,12 @@ module Homebrew
next
end
# Don't test unlinked formulae
if !ARGV.force? && !f.keg_only? && !f.linked?
ofail "#{f.full_name} is not linked"
next
end
puts "Testing #{f.full_name}"
env = ENV.to_hash