mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 09:58:56 +08:00 
			
		
		
		
	Handle failure in cache-cleanup
Do not abort the remainder of the post-action on failure in cache-cleanup. Instead, just log a warning and continue. Fixes #858 Fixes #990
This commit is contained in:
		@@ -90,7 +90,11 @@ export async function save(
 | 
			
		||||
    if (isCacheCleanupEnabled()) {
 | 
			
		||||
        core.info('Forcing cache cleanup.')
 | 
			
		||||
        const cacheCleaner = new CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']!)
 | 
			
		||||
        await cacheCleaner.forceCleanup()
 | 
			
		||||
        try {
 | 
			
		||||
            await cacheCleaner.forceCleanup()
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
            core.warning(`Cache cleanup failed. Will continue. ${String(e)}`)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    await core.group('Caching Gradle state', async () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user