mirror of
				https://gitea.com/actions/setup-python.git
				synced 2025-10-31 07:47:08 +00:00 
			
		
		
		
	Update cache-save.ts to support @actions/cache v3.0.0 lib
Made package.json and package-lock.json to use @actions/cache v3.0.0, updated logic of the cache-save operation and added unit-tests
This commit is contained in:
		| @@ -43,17 +43,11 @@ async function saveCache(packageManager: string) { | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   try { | ||||
|     await cache.saveCache(cachePaths, primaryKey); | ||||
|     core.info(`Cache saved with the key: ${primaryKey}`); | ||||
|   } catch (error) { | ||||
|     const err = error as Error; | ||||
|     if (err.name === cache.ReserveCacheError.name) { | ||||
|       core.info(err.message); | ||||
|     } else { | ||||
|       throw error; | ||||
|     } | ||||
|   const cacheId = await cache.saveCache(cachePaths, primaryKey); | ||||
|   if (cacheId == -1) { | ||||
|     return; | ||||
|   } | ||||
|   core.info(`Cache saved with the key: ${primaryKey}`); | ||||
| } | ||||
|  | ||||
| function isCacheDirectoryExists(cacheDirectory: string[]) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 IvanZosimov
					IvanZosimov