Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansi autodetection and JDK 22 #2083

Closed
cushon opened this issue Aug 11, 2023 · 0 comments · Fixed by #2084
Closed

Ansi autodetection and JDK 22 #2083

cushon opened this issue Aug 11, 2023 · 0 comments · Fixed by #2084

Comments

@cushon
Copy link
Contributor

cushon commented Aug 11, 2023

picocli uses this logic to check if the program's output streams are connected to a terminal, which assumes System.console() returns null when the output streams are redirected or connected to a virtual terminal.

https://github.com/remkop/picocli/blob/71553ae1e8728061f710bd49b6482efb79c77aee/src/main/java/picocli/CommandLine.java#L17843

That logic is broken by an upcoming JDK change (JDK-8309155]:

System.console() now returns a Console object when the standard streams are redirected or connected to a virtual terminal. In prior releases, System.console() returned null for these cases. This change may impact code that uses the return from System.console() to test if the VM is connected to a terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants