Formula#system: print dot for travis
This commit is contained in:
parent
9c5427d9a9
commit
8c9f0120ca
@ -530,7 +530,7 @@ module Homebrew
|
|||||||
formula_fetch_options << canonical_formula_name
|
formula_fetch_options << canonical_formula_name
|
||||||
test "brew", "fetch", "--retry", *formula_fetch_options
|
test "brew", "fetch", "--retry", *formula_fetch_options
|
||||||
test "brew", "uninstall", "--force", canonical_formula_name if formula.installed?
|
test "brew", "uninstall", "--force", canonical_formula_name if formula.installed?
|
||||||
install_args = []
|
install_args = ["--verbose"]
|
||||||
install_args << "--build-bottle" unless ARGV.include? "--no-bottle"
|
install_args << "--build-bottle" unless ARGV.include? "--no-bottle"
|
||||||
install_args << "--HEAD" if ARGV.include? "--HEAD"
|
install_args << "--HEAD" if ARGV.include? "--HEAD"
|
||||||
|
|
||||||
@ -848,7 +848,11 @@ module Homebrew
|
|||||||
ENV["HOMEBREW_SANDBOX"] = "1"
|
ENV["HOMEBREW_SANDBOX"] = "1"
|
||||||
ENV["HOMEBREW_NO_EMOJI"] = "1"
|
ENV["HOMEBREW_NO_EMOJI"] = "1"
|
||||||
ENV["HOMEBREW_FAIL_LOG_LINES"] = "150"
|
ENV["HOMEBREW_FAIL_LOG_LINES"] = "150"
|
||||||
ARGV << "--verbose" if ENV["TRAVIS"]
|
|
||||||
|
if ENV["TRAVIS"]
|
||||||
|
ARGV << "--verbose"
|
||||||
|
ENV["HOMEBREW_VERBOSE_USING_DOTS"] = "1"
|
||||||
|
end
|
||||||
|
|
||||||
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|
||||||
|| ARGV.include?("--ci-testing")
|
|| ARGV.include?("--ci-testing")
|
||||||
|
|||||||
@ -1255,6 +1255,8 @@ class Formula
|
|||||||
# system "make", "install"</pre>
|
# system "make", "install"</pre>
|
||||||
def system(cmd, *args)
|
def system(cmd, *args)
|
||||||
verbose = ARGV.verbose?
|
verbose = ARGV.verbose?
|
||||||
|
verbose_using_dots = !ENV["HOMEBREW_VERBOSE_USING_DOTS"].nil?
|
||||||
|
|
||||||
# remove "boring" arguments so that the important ones are more likely to
|
# remove "boring" arguments so that the important ones are more likely to
|
||||||
# be shown considering that we trim long ohai lines to the terminal width
|
# be shown considering that we trim long ohai lines to the terminal width
|
||||||
pretty_args = args.dup
|
pretty_args = args.dup
|
||||||
@ -1288,10 +1290,24 @@ class Formula
|
|||||||
end
|
end
|
||||||
wr.close
|
wr.close
|
||||||
|
|
||||||
|
if verbose_using_dots
|
||||||
|
last_dot = Time.at(0)
|
||||||
|
while buf = rd.gets
|
||||||
|
log.puts buf
|
||||||
|
# make sure dots printed with interval of at least 1 min.
|
||||||
|
if (Time.now - last_dot) > 60
|
||||||
|
print "."
|
||||||
|
$stdout.flush
|
||||||
|
last_dot = Time.now
|
||||||
|
end
|
||||||
|
end
|
||||||
|
puts
|
||||||
|
else
|
||||||
while buf = rd.gets
|
while buf = rd.gets
|
||||||
log.puts buf
|
log.puts buf
|
||||||
puts buf
|
puts buf
|
||||||
end
|
end
|
||||||
|
end
|
||||||
ensure
|
ensure
|
||||||
rd.close
|
rd.close
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user