better check for defaults on jline, only enable it if not on windows

This commit is contained in:
Shay Banon 2011-09-09 10:59:35 +03:00
parent 3fa08968a2
commit d00edfb165
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -31,6 +31,7 @@ import org.elasticsearch.common.jna.Natives;
import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.logging.log4j.LogConfigurator; import org.elasticsearch.common.logging.log4j.LogConfigurator;
import org.elasticsearch.common.os.OsUtils;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;
import org.elasticsearch.monitor.jvm.JvmInfo; import org.elasticsearch.monitor.jvm.JvmInfo;
@ -142,8 +143,8 @@ public class Bootstrap {
Bootstrap bootstrap = new Bootstrap(); Bootstrap bootstrap = new Bootstrap();
String pidFile = System.getProperty("es-pidfile"); String pidFile = System.getProperty("es-pidfile");
// enable jline by default when running form "main" // enable jline by default when running form "main" (and not on windows)
if (System.getProperty("jline.enabled") == null) { if (System.getProperty("jline.enabled") == null && !OsUtils.WINDOWS) {
System.setProperty("jline.enabled", "true"); System.setProperty("jline.enabled", "true");
} }