From d9ccb6b372f830fe4aab89460bb4b6147cfd924f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 5 Feb 2022 18:18:48 +0900 Subject: [ruby/reline] Check the ambiguous char width only on tty It sent the char to check even to non-tty, e.g., pipe. This causes `unknown command: "\xE2\x96\xBDstart ` warnings on ruby's parallel test on Windows, where non-standard FDs cannot be passed to child processes. https://github.com/ruby/reline/commit/0d373647fb --- lib/reline.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/reline.rb') diff --git a/lib/reline.rb b/lib/reline.rb index a9fc49b416..a57b570544 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -466,7 +466,7 @@ module Reline end private def may_req_ambiguous_char_width - @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File) + @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or !STDOUT.tty? return if defined? @ambiguous_width Reline::IOGate.move_cursor_column(0) begin -- cgit v1.2.3