diff --git a/workflow-steps/cache/hashing-utils.ts b/workflow-steps/cache/hashing-utils.ts index e16627a..efa6691 100644 --- a/workflow-steps/cache/hashing-utils.ts +++ b/workflow-steps/cache/hashing-utils.ts @@ -52,7 +52,7 @@ function hash(input: string) { } function tildePathToRelative(cachedFolderPath: string) { - if (cachedFolderPath.includes('~')) { + if (cachedFolderPath.startsWith('~')) { const expandedPath = cachedFolderPath.replace(/^~/, os.homedir()); return path.relative(process.cwd(), expandedPath); } diff --git a/workflow-steps/cache/output/post.js b/workflow-steps/cache/output/post.js index d38fb07..54bf407 100644 --- a/workflow-steps/cache/output/post.js +++ b/workflow-steps/cache/output/post.js @@ -5978,7 +5978,7 @@ function hash(input) { return crypto.createHash("sha256").update(input).digest("hex"); } function tildePathToRelative(cachedFolderPath) { - if (cachedFolderPath.includes("~")) { + if (cachedFolderPath.startsWith("~")) { const expandedPath = cachedFolderPath.replace(/^~/, os.homedir()); return path.relative(process.cwd(), expandedPath); }