Tidy-up caching code

- Extracted common code for Gradle User Home and Project .gradle caches
  into abstract supertype.
- Improve error handling by checking error types
This commit is contained in:
Daz DeBoer 2021-09-06 11:16:08 -06:00
parent c44ebadf6f
commit 6d1455a33e
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
6 changed files with 138 additions and 166 deletions

View file

@ -36,6 +36,9 @@ export async function run(): Promise<void> {
core.setFailed(`Gradle process exited with status ${result.status}`)
}
} catch (error) {
if (!(error instanceof Error)) {
throw error
}
core.setFailed(error.message)
}
}