SHL-60 - Jansi terminal support not working under cygwin

This commit is contained in:
Mark Pollack
2012-09-19 11:57:31 -04:00
parent 20781d687b
commit e2e9f965ac

View File

@@ -201,7 +201,7 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker,
protected ConsoleReader createConsoleReader() {
ConsoleReader consoleReader = null;
try {
if (JANSI_AVAILABLE && OsUtils.isWindows()) {
if (isJansiAvailable()) {
try {
consoleReader = createAnsiWindowsReader();
} catch (Exception e) {
@@ -218,6 +218,10 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker,
return consoleReader;
}
private boolean isJansiAvailable() {
return JANSI_AVAILABLE && OsUtils.isWindows() && System.getProperty("jline.terminal") == null;
}
public void printBannerAndWelcome() {
}