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
|
@ -67048,9 +67048,7 @@ class CacheConfig {
|
||||||
}
|
}
|
||||||
// Package without `[[package]].source` and `[[package]].checksum`
|
// Package without `[[package]].source` and `[[package]].checksum`
|
||||||
// are the one with `path = "..."` to crates within the workspace.
|
// are the one with `path = "..."` to crates within the workspace.
|
||||||
const packages = parsed.package.filter((p) => {
|
const packages = parsed.package.filter((p) => "source" in p || "checksum" in p);
|
||||||
"source" in p || "checksum" in p;
|
|
||||||
});
|
|
||||||
hasher.update(JSON.stringify(packages));
|
hasher.update(JSON.stringify(packages));
|
||||||
parsedKeyFiles.push(cargo_lock);
|
parsedKeyFiles.push(cargo_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67048,9 +67048,7 @@ class CacheConfig {
|
||||||
}
|
}
|
||||||
// Package without `[[package]].source` and `[[package]].checksum`
|
// Package without `[[package]].source` and `[[package]].checksum`
|
||||||
// are the one with `path = "..."` to crates within the workspace.
|
// are the one with `path = "..."` to crates within the workspace.
|
||||||
const packages = parsed.package.filter((p) => {
|
const packages = parsed.package.filter((p) => "source" in p || "checksum" in p);
|
||||||
"source" in p || "checksum" in p;
|
|
||||||
});
|
|
||||||
hasher.update(JSON.stringify(packages));
|
hasher.update(JSON.stringify(packages));
|
||||||
parsedKeyFiles.push(cargo_lock);
|
parsedKeyFiles.push(cargo_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,9 +198,7 @@ export class CacheConfig {
|
||||||
|
|
||||||
// Package without `[[package]].source` and `[[package]].checksum`
|
// Package without `[[package]].source` and `[[package]].checksum`
|
||||||
// are the one with `path = "..."` to crates within the workspace.
|
// are the one with `path = "..."` to crates within the workspace.
|
||||||
const packages = parsed.package.filter((p: any) => {
|
const packages = parsed.package.filter((p: any) => "source" in p || "checksum" in p);
|
||||||
"source" in p || "checksum" in p;
|
|
||||||
});
|
|
||||||
|
|
||||||
hasher.update(JSON.stringify(packages));
|
hasher.update(JSON.stringify(packages));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue