Skip to content

Commit

Permalink
Jansi fails to start on Mac arm, fixes #207
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 11, 2021
1 parent 4822bb1 commit e4d58d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/org/fusesource/jansi/AnsiConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ public static int getTerminalWidth() {

static final int ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;

static int STDOUT_FILENO = 1;

static int STDERR_FILENO = 2;


static {
if (getBoolean(JANSI_EAGER)) {
Expand All @@ -236,7 +240,9 @@ private static AnsiPrintStream ansiStream(boolean stdout) {
final boolean isatty;
boolean isAtty;
boolean withException;
final int fd = stdout ? CLibrary.STDOUT_FILENO : CLibrary.STDERR_FILENO;
// Do not use the CLibrary.STDOUT_FILENO to avoid errors in case
// the library can not be loaded on unsupported platforms
final int fd = stdout ? STDOUT_FILENO : STDERR_FILENO;
try {
// If we can detect that stdout is not a tty.. then setup
// to strip the ANSI sequences..
Expand Down

1 comment on commit e4d58d9

@michael-o
Copy link
Contributor

@michael-o michael-o commented on e4d58d9 Jun 12, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.