Closed altavir closed 8 years ago
Jna and janst terminals also do not work with different exceptions. Jansi:
at org.fusesource.jansi.WindowsAnsiOutputStream.getConsoleInfo(WindowsAnsiOutputStream.java:105)
at org.fusesource.jansi.WindowsAnsiOutputStream.<init>(WindowsAnsiOutputStream.java:98)
at org.jline.terminal.impl.jansi.JansiWinSysTerminal.<init>(JansiWinSysTerminal.java:32)
at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:146)
at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:109)
at hep.dataforge.grind.GrindShell.withTerminal(GrindShell.groovy:72)
at hep.dataforge.grind.GrindShell$withTerminal.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at hep.dataforge.grind.RunGrindShell.run(RunGrindShell.groovy:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:923)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:906)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:410)
at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at hep.dataforge.grind.RunGrindShell.main(RunGrindShell.groovy)
Jna:
java.lang.NullPointerException
at org.jline.utils.Log.render(Log.java:50)
at org.jline.utils.Log.log(Log.java:78)
at org.jline.utils.Log.debug(Log.java:31)
at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:180)
at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:109)
The behavior on windows is different from the one on unix plaftorms and imho they should be similar, so I'll fix this.
On unix, when the terminal is not a real terminal (such as in IDEA), a DumbTerminal
is created. It'd be better to detect a dumb terminal on windows and create the terminal accordingly.
Throws
on
LineReader::readLine