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

Update logic for detecting if the output stream is connected to a terminal #2084

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

cushon
Copy link
Contributor

@cushon cushon commented Aug 11, 2023

return false;
}
try {
Method isTerminal = Console.class.getDeclaredMethod("isTerminal");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but the Console class was introduced in Java 6, and picocli supports Java 5, so can you change this to find the Console class via reflection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done

@remkop remkop added this to the 4.7.5 milestone Aug 11, 2023
@remkop remkop linked an issue Aug 11, 2023 that may be closed by this pull request
@remkop
Copy link
Owner

remkop commented Aug 11, 2023

Thank you for raising this! Overall the PR looks good, please look at the minor change I requested to find the Console class via reflection.

@remkop remkop merged commit 60c446d into remkop:main Aug 14, 2023
1 of 20 checks passed
@remkop
Copy link
Owner

remkop commented Aug 14, 2023

Merged. Thank you for the contribution!

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

Successfully merging this pull request may close these issues.

Ansi autodetection and JDK 22
2 participants