Skip to content

Commit

Permalink
include paths as a string in the hash calculation rather than parsing…
Browse files Browse the repository at this point in the history
… them (#84)
  • Loading branch information
rarmatei authored Jan 9, 2025
1 parent 2ae4750 commit 6845bfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion workflow-steps/cache/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (!inputKey || !inputPaths) {

const paths = buildCachePaths(inputPaths, false);
const stringifiedPaths = paths.join(',');
const key = hashKey(`${inputKey}|${stringifiedPaths}`);
const key = hashKey(`${inputKey}|"${stringifiedPaths}"`);
const currentBranchKeys = [key].map((k) => `${currentBranch}-${k}`);
const baseBranchKeys = baseBranch ? [key].map((k) => `${baseBranch}-${k}`) : [];

Expand Down
2 changes: 1 addition & 1 deletion workflow-steps/cache/output/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6041,7 +6041,7 @@ if (!inputKey || !inputPaths) {
}
var paths = buildCachePaths(inputPaths, false);
var stringifiedPaths = paths.join(",");
var key = hashKey(`${inputKey}|${stringifiedPaths}`);
var key = hashKey(`${inputKey}|"${stringifiedPaths}"`);
var currentBranchKeys = [key].map((k) => `${currentBranch}-${k}`);
var baseBranchKeys = baseBranch ? [key].map((k) => `${baseBranch}-${k}`) : [];
cacheClient.restore(
Expand Down

0 comments on commit 6845bfb

Please sign in to comment.