Don't use project root as working directory for Kotlin daemon

On windows using a project's root
as a working directory for the daemon
seems to prevent removing the directory
when the daemon runs.

Different projects may share an instance of the daemon,
so the issue will be present only in a project
which started the daemon.
This commit is contained in:
Alexey Tsvetkov
2019-01-17 23:03:09 +03:00
parent f58acbeef5
commit 12e481192a
2 changed files with 8 additions and 1 deletions
@@ -64,7 +64,12 @@ class KotlinGradleIT : BaseGradleIT() {
val wd2 = createTempDir("testRunningInDifferentDir")
wd1.copyRecursively(wd2)
wd1.deleteRecursively()
assert(!wd1.exists())
if (wd1.exists()) {
val files = buildString {
wd1.walk().forEach { appendln(" " + it.relativeTo(wd1).path) }
}
error("Some files in $wd1 were not removed:\n$files")
}
wd0.setWritable(false)
workingDir = wd2