Is there a way to programatically check if a sbt build can be loaded without running the risk of sbt waiting for user input? I want to run 'sbt test' as part of an automated git/hg bisect but I got commits where sbt fails to start up because of errors in the build definition and then asks the user what it should do.
See also: Have sbt fail when project loading fails (rather than awaiting user input)?
Using the
--batchflag, one can instructsbtto forgo the interactive questioning. It will still exit with an exit code of1in case of an error: