SBT交互模式命令不Babun

问题描述:

下完成我不能运行在交互模式SBT任何命令,而如果在命令行中使用的相同命令的工作。 我正在SBT 0.13.13与Java在Babun Cygwin的Windows 7上1.8.0_102-B14。 我已经创建了一个最小的Scala项目,以解决其他sbt问题。 sbt可以编译我的项目并且可以进入交互模式,但是它会被任何命令卡住。为什么/我该如何解决这个问题?SBT交互模式命令不Babun

{ sbtXmpl } > ./sbt projects 
+ java -jar ./build/buildcommon/sbt-launch.jar projects 
[info] Loading global plugins from C:\Users\MyName\.sbt\0.13\plugins 
[info] Loading project definition from C:\dev\sbtXmpl\project 
[info] Set current project to root (in build file:/C:/dev/sbtXmpl/) 
[info] In file:/C:/dev/sbtXmpl/ 
[info]  core 
[info] * root 
[info]  util 
{ sbtXmpl } > ./sbt 
+ java -jar ./build/buildcommon/sbt-launch.jar 
[info] Loading global plugins from C:\Users\MyName\.sbt\0.13\plugins 
[info] Loading project definition from C:\dev\sbtXmpl\project 
[info] Set current project to root (in build file:/C:/dev/sbtXmpl/) 
> projects 
// This never returns 
^C 
zsh: command not found: projects 
+0

其实,这可能更多的是使用Cygwin/Babun及其与Windows交互。我无法交互运行Python,但我可以运行“python SomeScript.py” – radumanolescu

+0

是的。这看起来像你输入('projects')未发送至'sbt',因为'zsh'注意到它'sbt'被杀害后。这可能是比'sbt'更高的错误。 – jkinkead

这可能涉及到一个控制台Java应用程序(SBT)如何与外壳进行交互。 我是能够解决的问题通过在我用来运行SBT脚本添加下面的代码片段SBT:

if [ "$(expr substr $(uname -s) 1 6)" == "CYGWIN" ];then 
    #Ensure that sbt uses the correct terminal settings 
    CYG_OPTS="-Djline.terminal=jline.UnixTerminal -Dsbt.cygwin=true" 
    #Prevent erase, kill, werase, and rprnt special characters 
    stty -icanon min 1 -echo > /dev/null 2>&1 
fi 

#launch sbt 
java $CYG_OPTS $JAVA_OPTS -jar $SBT_LAUNCHER "[email protected]" 

我还没有找到一个用于Python的解决方案。

REPL programs (sbt, python) do not complete under Babun

Babun breaks on winows apps with console input