mirror of
				https://github.com/Swatinem/rust-cache
				synced 2025-10-31 04:42:27 +00:00 
			
		
		
		
	Fix typo in hashing parsed Cargo.lock (#159)
				
					
				
			This simple mistake caused the entire `Cargo.lock` to be ignored (JS treats having no return as `false`). Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
		
							parent
							
								
									b919e1427f
								
							
						
					
					
						commit
						4e0f4b19dd
					
				
					 3 changed files with 3 additions and 9 deletions
				
			
		
							
								
								
									
										4
									
								
								dist/restore/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/restore/index.js
									
										
									
									
										vendored
									
									
								
							|  | @ -67048,9 +67048,7 @@ class CacheConfig { | |||
|                     } | ||||
|                     // Package without `[[package]].source` and `[[package]].checksum`
 | ||||
|                     // are the one with `path = "..."` to crates within the workspace.
 | ||||
|                     const packages = parsed.package.filter((p) => { | ||||
|                         "source" in p || "checksum" in p; | ||||
|                     }); | ||||
|                     const packages = parsed.package.filter((p) => "source" in p || "checksum" in p); | ||||
|                     hasher.update(JSON.stringify(packages)); | ||||
|                     parsedKeyFiles.push(cargo_lock); | ||||
|                 } | ||||
|  |  | |||
							
								
								
									
										4
									
								
								dist/save/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/save/index.js
									
										
									
									
										vendored
									
									
								
							|  | @ -67048,9 +67048,7 @@ class CacheConfig { | |||
|                     } | ||||
|                     // Package without `[[package]].source` and `[[package]].checksum`
 | ||||
|                     // are the one with `path = "..."` to crates within the workspace.
 | ||||
|                     const packages = parsed.package.filter((p) => { | ||||
|                         "source" in p || "checksum" in p; | ||||
|                     }); | ||||
|                     const packages = parsed.package.filter((p) => "source" in p || "checksum" in p); | ||||
|                     hasher.update(JSON.stringify(packages)); | ||||
|                     parsedKeyFiles.push(cargo_lock); | ||||
|                 } | ||||
|  |  | |||
|  | @ -198,9 +198,7 @@ export class CacheConfig { | |||
| 
 | ||||
|           // Package without `[[package]].source` and `[[package]].checksum`
 | ||||
|           // are the one with `path = "..."` to crates within the workspace.
 | ||||
|           const packages = parsed.package.filter((p: any) => { | ||||
|             "source" in p || "checksum" in p; | ||||
|           }); | ||||
|           const packages = parsed.package.filter((p: any) => "source" in p || "checksum" in p); | ||||
| 
 | ||||
|           hasher.update(JSON.stringify(packages)); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue