Only restore wrapper cache if dir doesn't exist

This commit is contained in:
Paul Merlin 2020-06-15 19:33:04 +02:00
parent eb7eb78d95
commit 466a737d16
3 changed files with 3 additions and 2 deletions

2
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@ export async function restoreCachedWrapperDist(
os.homedir(), os.homedir(),
`.gradle/wrapper/dists/gradle-${wrapperSlug}` `.gradle/wrapper/dists/gradle-${wrapperSlug}`
) )
if (fs.existsSync(wrapperCachePath)) return
core.saveState(WRAPPER_CACHE_KEY, wrapperCacheKey) core.saveState(WRAPPER_CACHE_KEY, wrapperCacheKey)
core.saveState(WRAPPER_CACHE_PATH, wrapperCachePath) core.saveState(WRAPPER_CACHE_PATH, wrapperCachePath)