Better error reporting when file deletion fails

- Include file name in all logging
- Log inital attempts at debug to avoid noise
- Include output of 'jps -lm' when final attempt fails
This commit is contained in:
Daz DeBoer 2022-06-06 09:26:49 -06:00
parent 9cd70b5460
commit 8096e65e0a
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
2 changed files with 16 additions and 5 deletions

View file

@ -13,7 +13,7 @@ const GRADLE_USER_HOME = 'GRADLE_USER_HOME'
const CACHE_LISTENER = 'CACHE_LISTENER'
const JOB_SUMMARY_ENABLED_PARAMETER = 'generate-job-summary'
function generateJobSummary(): boolean {
function shouldGenerateJobSummary(): boolean {
return core.getBooleanInput(JOB_SUMMARY_ENABLED_PARAMETER)
}
@ -56,7 +56,7 @@ export async function complete(): Promise<void> {
const gradleUserHome = core.getState(GRADLE_USER_HOME)
await caches.save(gradleUserHome, cacheListener)
if (generateJobSummary()) {
if (shouldGenerateJobSummary()) {
writeJobSummary(buildResults, cacheListener)
}
}