Set swoval.tmpdir with absolute path via globalBasePath (#5048)

Fixes https://github.com/sbt/sbt/issues/5047

When setting swoval.tmpdir via globalBase, changed to set globalBase as absolute path.

`com.swoval.runtime.NativeLoader.loadPackaged` uses `java.lang.System.load`.
It requires absolute path, so we should set `swoval.tmpdir` with absolute path.
This commit is contained in:
Yusuke Yamada 2019-09-10 03:13:34 +09:00 committed by eugene yokota
parent e28e451431
commit ae9bba4b80
2 changed files with 12 additions and 1 deletions

View File

@ -100,7 +100,10 @@ private[sbt] object Load {
val delegates = defaultDelegates val delegates = defaultDelegates
val pluginMgmt = PluginManagement(loader) val pluginMgmt = PluginManagement(loader)
val inject = InjectSettings(injectGlobal(state), Nil, const(Nil)) val inject = InjectSettings(injectGlobal(state), Nil, const(Nil))
System.setProperty("swoval.tmpdir", System.getProperty("swoval.tmpdir", globalBase.toString)) System.setProperty(
"swoval.tmpdir",
System.getProperty("swoval.tmpdir", globalBase.getAbsolutePath.toString)
)
LoadBuildConfiguration( LoadBuildConfiguration(
stagingDirectory, stagingDirectory,
classpath, classpath,

View File

@ -0,0 +1,8 @@
[@yamachu]: https://github.com/yamachu
[#5047]: https://github.com/sbt/sbt/issues/5047
[#5048]: https://github.com/sbt/sbt/pull/5048
### Bug Fixes
- Enable file watching when setting relative path to sbt.global.base [#5047][5047]/[#5048][5048] by [@yamachu][@yamachu]