Skip to content

Commit

Permalink
Add terminal failsafe for when there is no console
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Feb 23, 2024
1 parent 7b3d287 commit 70f068f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public static void setupTerminalConsole(
ShutdownManager shutdownManager,
ClientCommandManager clientCommandManager) {
SFTerminalConsole.setupStreams();

if (System.console() == null) {
logger.debug("No console available, not starting a terminal console.");
return;
}

threadPool.execute(new SFTerminalConsole(shutdownManager, clientCommandManager)::start);
}

Expand Down

0 comments on commit 70f068f

Please sign in to comment.