Skip to content

Commit

Permalink
rename cache key to be safe for the fs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Walker-GM committed May 8, 2024
1 parent 17b50b9 commit 329650d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion triage/lib/triage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export const cache = {
toHash,
].join("_");

return cacheKey;
// The cache key must be a valid file name so here we replace potentially invalid characters
// with underscores
return cacheKey.replace(/[^a-zA-Z0-9_]/g, "_");
},

async has(key: string) {
Expand Down

0 comments on commit 329650d

Please sign in to comment.