mirror of
https://github.com/Swatinem/rust-cache.git
synced 2024-11-23 06:16:07 +08: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
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…
Reference in New Issue
Block a user