We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d1ed0b commit dbb16d9Copy full SHA for dbb16d9
src/main/kotlin/kscript/app/Kscript.kt
@@ -52,7 +52,9 @@ Website : https://github.com/holgerbrandl/kscript
52
""".trim()
53
54
// see https://stackoverflow.com/questions/585534/what-is-the-best-way-to-find-the-users-home-directory-in-java
55
-val KSCRIPT_CACHE_DIR = File(System.getProperty("user.home")!!, ".kscript")
+// See #146 "allow kscript cache dir to be configurable" for details
56
+val KSCRIPT_CACHE_DIR = System.getenv("KSCRIPT_CACHE_DIR")?.let { File(it) }
57
+ ?: File(System.getProperty("user.home")!!, ".kscript")
58
59
// use lazy here prevent empty dirs for regular scripts https://github.com/holgerbrandl/kscript/issues/130
60
val SCRIPT_TEMP_DIR by lazy { createTempDir() }
0 commit comments