lib/rake/funnel/extensions/shell.rb in rake-funnel-0.22.1 vs lib/rake/funnel/extensions/shell.rb in rake-funnel-0.22.2

- old
+ new

@@ -18,14 +18,14 @@ end end private - def run(cmd, log_file, error_lines) + def run(cmd, log_file, error_lines) # rubocop:disable Metrics/AbcSize cmd, readable_cmd = normalize(cmd) - Rake.rake_output_message(readable_cmd) + $stderr.print(readable_cmd + "\n") Open3.popen2e(*cmd) do |_, stdout_and_stderr, wait_thread| log, error_logged = log_output(stdout_and_stderr, log_file, error_lines) success = wait_thread.value.success? && error_logged == false @@ -68,17 +68,17 @@ def handle_line(line, error_lines) to_stderr(line, error_lines) || to_stdout(line) end def to_stdout(line) - $stdout.puts(line.rstrip.green) + $stdout.print(line.rstrip.green + "\n") :success end def to_stderr(line, error_lines) return unless error_lines && line =~ error_lines - Kernel.warn(line.rstrip.bold.red) + $stderr.print(line.rstrip.bold.red + "\n") :error end end end end