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

Fails with git-bash on Windows #97

Open
memo33 opened this issue Sep 1, 2023 · 0 comments
Open

Fails with git-bash on Windows #97

memo33 opened this issue Sep 1, 2023 · 0 comments

Comments

@memo33
Copy link

memo33 commented Sep 1, 2023

Following the instructions from the Readme results in an exception with git-bash, as reported by another user.

val isWindows = System.getProperty("os.name").toLowerCase(java.util.Locale.ROOT).contains("windows")
val supportsColor = io.github.alexarchambault.windowsansi.WindowsAnsi.setup()
val useColor = !isWindows || supportsColor
java.io.IOException: Failed to get console mode: The operation completed successfully.

        at io.github.alexarchambault.windowsansi.WindowsAnsi.setup(WindowsAnsi.java:34)
[...]

Of course, this is not entirely unexpected, but it is not clear how to detect this scenario. A workaround is to directly use Jansi instead.

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