Initialize pre-existing Gradle User Home

This commit is contained in:
Daz DeBoer
2022-01-17 12:38:14 -07:00
parent 755aebc7d1
commit 3aa7bfe163
2 changed files with 13 additions and 0 deletions

View File

@@ -99,6 +99,12 @@ export class GradleStateCache {
this.initializeGradleUserHome(this.gradleUserHome, initScriptsDir)
}
cacheOutputExists(): boolean {
// Need to check for 'caches' directory to avoid incorrect detection on MacOS agents
const paths = this.getCachePath()
return paths.some(x => fs.existsSync(x))
}
/**
* Restores the cache entry, finding the closest match to the currently running job.
*/