aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-06-23 17:42:09 +0100
committerMike McQuaid2017-06-23 17:42:09 +0100
commit7d5cce569d6d9bff52496c517f6776e0d3710281 (patch)
tree28b053101333d5ffc7f3c372ef1fcd4469f2bbff
parent8a5f12076bec42c0305c1121b82d81c455ab1501 (diff)
downloadbrew-7d5cce569d6d9bff52496c517f6776e0d3710281.tar.bz2
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
-rw-r--r--Library/Homebrew/dev-cmd/test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb
index 288aa8a87..738a0ef29 100644
--- a/Library/Homebrew/dev-cmd/test.rb
+++ b/Library/Homebrew/dev-cmd/test.rb
@@ -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