-
Notifications
You must be signed in to change notification settings - Fork 41.1k
AnsiOutput.detectIfAnsiCapable broken on JDK22 #40160
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
Comments
@scottfrederick @kilink |
@facewise Feel free to have a go, but we're not 100% sure how to fix it since we need to keep our build on Java 17. We might be able to use reflection to make the call to It's also going to be pretty hard to test. We might be able to create a testcontainers test, or we might just have to accept manual testing for now. Please ask if you have any questions. |
@philwebb It seems great to make a new test similar to tests in |
@facewise That sounds fine, we can always move it around when we merge the code if we find a better long-term home. |
I think we may be able to test it by reverting most of 8efdc1e. |
@philwebb Should I accept the reversion @wilkinsona said? |
Closing in favor of #40172 |
The
detectIfAnsiCapable
method inAnsiOutput
does not work correctly on JDK22. It checks if System.console() returns null, but on JDK22 System.console() never returns null; there's a new method on Console to detect if the instance is a terminal or not.Some details here about the change:
The result is that on JDK22, color / ANSI output is turned on when it shouldn't be.
The text was updated successfully, but these errors were encountered: