Skip to content

Commit

Permalink
Add null-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Eng-Fouad authored and stalep committed May 30, 2024
1 parent 79cd22d commit b66e7f0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ private Terminal createWindowsTerminal(String name) throws IOException {

// Console.isTerminal() was introduced in Java 22
private static boolean isTerminal(Console console) {
if (console == null) {
return false;
}
try {
Method isTerminal = Console.class.getMethod("isTerminal");
try {
Expand Down

0 comments on commit b66e7f0

Please sign in to comment.