test-bot: don't use --build-bottle flag if bottle disabled

This commit is contained in:
Xu Cheng 2015-10-19 21:50:12 +08:00
parent 4ef15427ba
commit 1a0f64d5f8

View File

@ -547,13 +547,13 @@ module Homebrew
test "brew", "postinstall", *changed_dependences
end
formula_fetch_options = []
formula_fetch_options << "--build-bottle" unless ARGV.include? "--fast"
formula_fetch_options << "--build-bottle" if !ARGV.include?("--fast") && !formula.bottle_disabled?
formula_fetch_options << "--force" if ARGV.include? "--cleanup"
formula_fetch_options << canonical_formula_name
test "brew", "fetch", "--retry", *formula_fetch_options
test "brew", "uninstall", "--force", canonical_formula_name if formula.installed?
install_args = ["--verbose"]
install_args << "--build-bottle" unless ARGV.include? "--fast"
install_args << "--build-bottle" if !ARGV.include?("--fast") && !formula.bottle_disabled?
install_args << "--HEAD" if ARGV.include? "--HEAD"
# Pass --devel or --HEAD to install in the event formulae lack stable. Supports devel-only/head-only.