Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
task created by fullRunInputTask doesn't capture sys.exit #831
the program runs, and upon
the program shuts down, and returns to sbt shell as
More generally, SBT seems to treat run tasks created with
The issue described above is just one consequence.
Another consequence is this: if an exception is thrown within a program executed via
I know nothing about the internals of SBT and the technical difficulties involved. But judging purely from a user perspective, it would be nice if SBT could provide a uniform treatment of default and custom run tasks.
Both the default and custom run tasks are configured by
Thanks for the explanation, Mark!
Since it doesn't, could you tell me the simplest way to define (in build.sbt) a
Configure the revelant settings
@eed3si9n I forgot about trapExit. That will fix the issue. However, the reason it isn't on by default is that it can only handle one
So now I have something like this in my "build.sbt":
fullRunInputTask(InputKey[Unit]("customRun"), Runtime, "Main") trapExit in customRun := true fork in customRun := true traceLevel in customRun := 0
And SBT complains:
I understand why this happens. My question is: is there a way to achieve what I want having only a "build.sbt" file? Or will I need to write a "Build.scala" file, in order to use the full power of the Scala language (even if in this case I just need to know the key object that was created by