Skip to content

Commit

Permalink
Protect RC provisioning from network problems and add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eskatos committed Sep 13, 2020
1 parent c8c53f5 commit cb2742a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/provision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit cb2742a

Please sign in to comment.