Sublime Forum

How to stop a sbt continous build?

#1

Hey,

I want to execute “sbt ~test” as a build system. This is my build system:

{
  "shell": true,
  "cmd": "sbt", "~test"],  
  "working_dir": "$project_path"
}

(the “~test” lets sbt compile and test the whole project each time a file is changed, so the build actually never finishes automatically)

My problem is now, that when I cancel the Build in Sublime, the console says “[Cancelled]”, but in the background sbt keeps running and the only way to stop is killing the java.exe in the task manager.

0 Likes

#2

no ideas? :frowning:

0 Likes

#3

An idea:
When setting the shell argument you execute sbt using the shell, so it means that ST2 run the shell that run sbt.
When canceling, ST2 terminate the shell process, but not the child processes that it has created.

Is shell argument mandatory ? Couldn’t you specify the whole command in the cmd ?

0 Likes

#4

the shell is needed or at least its cmd.exe to execute the sbt.bat … which then checks several environment variables to find the java and sbt installation and execute it all together. I think there is no clean solution down this way …

But I just found a cool plugin called SublimeREPL which can execute the sbt console as a repl. Currently the build in sbt configuration isn’t working for me, but this should be easy to fix.

0 Likes