Skip to content

Commit

Permalink
Merge pull request #441 from scalacenter/issue-436
Browse files Browse the repository at this point in the history
Fix #436: Remove annoying log4j scripted exception
  • Loading branch information
dwijnand committed Oct 25, 2017
2 parents aa1a628 + 045f194 commit ee74feb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions project/Scripted.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ object Scripted {
bufferLog: Boolean,
prescripted: File => Unit): Unit = {
System.err.println(s"About to run tests: ${args.mkString("\n * ", "\n * ", "\n")}")
// Force Log4J to not use a thread context classloader otherwise it throws a CCE
sys.props(org.apache.logging.log4j.util.LoaderUtil.IGNORE_TCCL_PROPERTY) = "true"
val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil)
val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine)
val bridgeClass = Class.forName("sbt.internal.inc.IncScriptedRunner", true, loader)
Expand Down

0 comments on commit ee74feb

Please sign in to comment.