From 50d5227c5653bd010eed70c923302ca06fe78fcb Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 10 Oct 2023 11:28:28 +0200 Subject: [PATCH] [GR-49359] Use java.io.Console#isTerminal() on 22+ for isatty() checks --- .../truffleruby/launcher/RubyLauncher.java | 4 +- .../stdlib/readline/ConsoleHolder.java | 3 +- .../stdlib/readline/IsTTYHelper.java | 44 +++++++++++++++++++ 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 src/main/java/org/truffleruby/stdlib/readline/IsTTYHelper.java diff --git a/src/launcher/java/org/truffleruby/launcher/RubyLauncher.java b/src/launcher/java/org/truffleruby/launcher/RubyLauncher.java index ebc347795145..71131a1f13e0 100644 --- a/src/launcher/java/org/truffleruby/launcher/RubyLauncher.java +++ b/src/launcher/java/org/truffleruby/launcher/RubyLauncher.java @@ -230,7 +230,7 @@ protected boolean parseCommonOption(String defaultOptionPrefix, Map