mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 20:08:36 +08:00 
			
		
		
		
	fix: cache-hit output
This commit is contained in:
		
							parent
							
								
									0c45773b62
								
							
						
					
					
						commit
						688d5d4688
					
				|  | @ -86,7 +86,8 @@ test("restore with no cache found", async () => { | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key); |     expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key); | ||||||
|     expect(outputMock).toHaveBeenCalledTimes(1); |     expect(outputMock).toHaveBeenCalledWith("cache-hit", "false"); | ||||||
|  |     expect(outputMock).toHaveBeenCalledTimes(2); | ||||||
|     expect(failedMock).toHaveBeenCalledTimes(0); |     expect(failedMock).toHaveBeenCalledTimes(0); | ||||||
| 
 | 
 | ||||||
|     expect(infoMock).toHaveBeenCalledWith( |     expect(infoMock).toHaveBeenCalledWith( | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -59422,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) { | ||||||
|                     primaryKey, |                     primaryKey, | ||||||
|                     ...restoreKeys |                     ...restoreKeys | ||||||
|                 ].join(", ")}`);
 |                 ].join(", ")}`);
 | ||||||
|  |                 core.setOutput(constants_1.Outputs.CacheHit, false.toString()); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             // Store the matched cache key in states
 |             // Store the matched cache key in states
 | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -59422,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) { | ||||||
|                     primaryKey, |                     primaryKey, | ||||||
|                     ...restoreKeys |                     ...restoreKeys | ||||||
|                 ].join(", ")}`);
 |                 ].join(", ")}`);
 | ||||||
|  |                 core.setOutput(constants_1.Outputs.CacheHit, false.toString()); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             // Store the matched cache key in states
 |             // Store the matched cache key in states
 | ||||||
|  |  | ||||||
|  | @ -62,7 +62,7 @@ export async function restoreImpl( | ||||||
|                     ...restoreKeys |                     ...restoreKeys | ||||||
|                 ].join(", ")}` |                 ].join(", ")}` | ||||||
|             ); |             ); | ||||||
| 
 |             core.setOutput(Outputs.CacheHit, false.toString()); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Ryo Mimura
						Ryo Mimura