Skip to content
Snippets Groups Projects
Unverified Commit 56a8f8f9 authored by nandahkrishna's avatar nandahkrishna
Browse files

livecheck: fix TTY output for progress bar

parent cf293d0e
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,10 @@ module Homebrew
formulae_to_check.length
end
$stderr.puts Formatter.headline("Running checks", color: :blue)
Tty.with($stderr) do |stderr|
stderr.puts Formatter.headline("Running checks", color: :blue)
end
progress = ProgressBar.create(
total: total_formulae,
progress_mark: "#",
......@@ -182,7 +185,9 @@ module Homebrew
if progress
progress.finish
$stderr.print "#{Tty.up}#{Tty.erase_line}" * 2
Tty.with($stderr) do |stderr|
stderr.print "#{Tty.up}#{Tty.erase_line}" * 2
end
end
puts JSON.generate(formulae_checked.compact)
......
......@@ -88,7 +88,7 @@ module Tty
SPECIAL_CODES.each do |name, code|
define_singleton_method(name) do
if $stdout.tty?
if @stream.tty?
"\033[#{code}"
else
""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment