Skip to content

Commit 4ade529

Browse files
committed
getIdhashesPathFriendly
1 parent 0716eb7 commit 4ade529

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/LayerCache.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ class LayerCache {
215215
}
216216

217217
getIdhashesPathFriendly(): string {
218-
return crypto.createHash(`sha256`).update(this.ids.join(`-`), `utf8`).digest(`hex`)
218+
const result = crypto.createHash(`sha256`).update(this.ids.join(`-`), `utf8`).digest(`hex`)
219+
core.debug(JSON.stringify({ log: `getIdhashesPathFriendly`, result }))
220+
return result
219221
}
220222

221223
getRootKey(): string {
@@ -233,7 +235,7 @@ class LayerCache {
233235
}
234236

235237
getFormattedOriginalCacheKey(hashThatMayBeSpecified?: string) {
236-
const hash = hashThatMayBeSpecified || this.getIdhashesPathFriendly()
238+
const hash = hashThatMayBeSpecified !== undefined ? hashThatMayBeSpecified : this.getIdhashesPathFriendly()
237239
const result = format(this.originalKeyThatMayUnformatted, { hash })
238240
core.debug(JSON.stringify({ log: `getFormattedOriginalCacheKey`, hash, hashThatMayBeSpecified, result }))
239241
return result

0 commit comments

Comments
 (0)