fun fallbackWithWarning()

in src/setup-bazelisk/src.main.kts [315:321]


fun fallbackWithWarning(path: Path, cause: Exception): Path {
    val tmpDir = System.getProperty("java.io.tmpdir")
        ?: throw IllegalStateException("No 'java.io.tmpdir' defined", cause)
    writeWarning("Installation path '$path' is not writable, using '$tmpDir' (Switch to 'Verbose' log level to see stacktrace)")
    writeDebug(cause.stackTraceToString())
    return Paths.get(tmpDir)
}