mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-10-31 10:41:57 +08:00 
			
		
		
		
	Update cache-save.ts to support @actions/cache v3.0.0 lib
This commit is contained in:
		| @ -49,18 +49,12 @@ const cachePackages = async (packageManager: string) => { | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   try { | ||||
|     await cache.saveCache([cachePath], primaryKey); | ||||
|     core.info(`Cache saved with the key: ${primaryKey}`); | ||||
|   } catch (error) { | ||||
|     if (error.name === cache.ValidationError.name) { | ||||
|       throw error; | ||||
|     } else if (error.name === cache.ReserveCacheError.name) { | ||||
|       core.info(error.message); | ||||
|     } else { | ||||
|       core.warning(`${error.message}`); | ||||
|     } | ||||
|   const cacheId = await cache.saveCache([cachePath], primaryKey); | ||||
|   if (cacheId == -1) { | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   core.info(`Cache saved with the key: ${primaryKey}`); | ||||
| }; | ||||
|  | ||||
| run(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 IvanZosimov
					IvanZosimov