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
|
||||
test "brew", "fetch", "--retry", *formula_fetch_options
|
||||
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 << "--HEAD" if ARGV.include? "--HEAD"
|
||||
|
||||
@ -848,7 +848,11 @@ module Homebrew
|
||||
ENV["HOMEBREW_SANDBOX"] = "1"
|
||||
ENV["HOMEBREW_NO_EMOJI"] = "1"
|
||||
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") \
|
||||
|| ARGV.include?("--ci-testing")
|
||||
|
||||
@ -1255,6 +1255,8 @@ class Formula
|
||||
# system "make", "install"</pre>
|
||||
def system(cmd, *args)
|
||||
verbose = ARGV.verbose?
|
||||
verbose_using_dots = !ENV["HOMEBREW_VERBOSE_USING_DOTS"].nil?
|
||||
|
||||
# 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
|
||||
pretty_args = args.dup
|
||||
@ -1288,9 +1290,23 @@ class Formula
|
||||
end
|
||||
wr.close
|
||||
|
||||
while buf = rd.gets
|
||||
log.puts buf
|
||||
puts buf
|
||||
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
|
||||
log.puts buf
|
||||
puts buf
|
||||
end
|
||||
end
|
||||
ensure
|
||||
rd.close
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user