mirror of https://github.com/sbt/sbt.git
Set swoval.tmpdir property on startup
This change makes the temporary shared library that is created by the swoval file-tree-views library to be extracted into the sbt global base directory rather than the temp file. This way if there is a leak of shared libraries, they can easily be found in ~/.sbt rather than in, say, /tmp (or the osx/windows equivalent location). The extracted shared library objects will be in the path ~/.sbt/swoval-jni. There is a shutdown hook that removes them as well as a garbage collection process that runs in the background whenever the swoval library is loaded, so these shouldn't leak uncontrollably.
This commit is contained in:
parent
da54e2fbd3
commit
6ffb4108e7
|
|
@ -113,6 +113,7 @@ private[sbt] object Load {
|
|||
val delegates = defaultDelegates
|
||||
val pluginMgmt = PluginManagement(loader)
|
||||
val inject = InjectSettings(injectGlobal(state), Nil, const(Nil))
|
||||
System.setProperty("swoval.tmpdir", System.getProperty("swoval.tmpdir", globalBase.toString))
|
||||
LoadBuildConfiguration(
|
||||
stagingDirectory,
|
||||
classpath,
|
||||
|
|
|
|||
Loading…
Reference in New Issue