Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19859

org.gradle.api.UncheckedIOException: Could not update last-build.bin

$
0
0

My workaround is to force user/group sticky bit on the GRADLE_USER_HOME/caches directory, and to make sure existing files/directories are writable by current and ‘other’ users:

task umask000fix() {
    doFirst {
        // workaround for umask 000 requirement
        def gradleUserHome=project.getGradle().getGradleUserHomeDir()
        def cacheDir="${gradleUserHome}/caches"
        println ":: cacheDir = $cacheDir"
        // Make cacheDir if not already made
        file(cacheDir).mkdirs()
        // Make sure all new 'cacheDir' files are owned by current user
        // by setting sticky bit for group and owner.
        "chmod -R 6777 ${cacheDir}".execute()
        println ":: " + "ls -ld ${cacheDir}".execute().text
    }
}
tasks.check.dependsOn umask000fix

Depending on ‘check’ was intended to fix issue as soon as possible.


Viewing all articles
Browse latest Browse all 19859

Trending Articles