Protect RC provisioning from network problems and add logging

This commit is contained in:
Paul Merlin 2020-09-13 13:30:54 +02:00
parent c8c53f54bb
commit cb2742a00b
2 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

View File

@ -41,9 +41,10 @@ async function gradleReleaseCandidate(): Promise<string> {
const versionInfo = await gradleVersionDeclaration(
`${gradleVersionsBaseUrl}/release-candidate`
)
if (versionInfo) {
if (versionInfo && versionInfo.version && versionInfo.downloadUrl) {
return provisionGradle(versionInfo.version, versionInfo.downloadUrl)
}
core.info('No current release-candidate found, will fallback to current')
return gradleCurrent()
}