Skip to content

Fails with git-bash on Windows #97

@memo33

Description

@memo33

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions