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

MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED #290

Open
rosti-il opened this issue Jul 2, 2024 · 1 comment
Open

Comments

@rosti-il
Copy link

rosti-il commented Jul 2, 2024

This message is printed by Jansi 2.4.1 when I run Maven 3.9.8 that uses it as one of its libraries.
Also if I just run java -jar jansi-2.4.1.jar in Git Bash of Git for Windows 2.45.2.windows.1 this is what I see in the lines it prints out:

MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED
isatty(STDOUT_FILENO): 0, System.out is *NOT* a terminal
width(STDOUT_FILENO): 0
MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED
isatty(STDERR_FILENO): 0, System.err is *NOT* a terminal
width(STDERR_FILENO): 0
MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED
MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED

As you can see it still can't recognize System.out and System.err as terminals and still can't find the terminal width.
Tried with Java 17 and 22 from Oracle.

The code that prints that "MINGW support requires" message was introduced in #264 as a fix of #233
I decided to rework it and made it right and simpler.
Please see my pull request that I will make shortly after opening this bug report.

@rosti-il
Copy link
Author

rosti-il commented Jul 2, 2024

Pull Request is #291
Please review and merge it.

That version works properly on both Git Bash and Window 10 CMD and contains following lines printed out:

isatty(STDOUT_FILENO): 1, System.out is a terminal
width(STDOUT_FILENO): 140
isatty(STDERR_FILENO): 1, System.err is a terminal
width(STDERR_FILENO): 140

If I change width of the Mintty window of Git Bash and rerun, the printed width is properly changed appropriately.

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

No branches or pull requests

1 participant