mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 08:46:10 +02:00
Fix check for pre-existing Gradle User Home
This commit is contained in:
parent
50ca2bca83
commit
7dee0f45c2
2 changed files with 13 additions and 4 deletions
|
@ -100,9 +100,14 @@ export class GradleStateCache {
|
|||
}
|
||||
|
||||
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))
|
||||
for (const p of paths) {
|
||||
if (fs.existsSync(p)) {
|
||||
cacheDebug(`Cache output exists at ${p}`)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue