Skip to content

Commit 88c248d

Browse files
committed
dismiss cache already exists error
1 parent d8c1bca commit 88c248d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/LayerCache.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,17 @@ class LayerCache {
3232
await this.saveImageAsUnpacked()
3333
await this.separateAllLayerCaches()
3434
// Todo: remove await
35-
const storeRoot = await this.storeRoot()
35+
const storeRoot = this.storeRoot()
3636
const storeLayers = this.storeLayers()
37-
await Promise.all([storeRoot, storeLayers])
37+
try {
38+
await Promise.all([storeRoot, storeLayers])
39+
} catch (e) {
40+
if (typeof e.message !== 'string' || !e.message.includes(`Cache already exists`)) {
41+
throw e
42+
}
43+
core.info(`Cache already exists, key: ${this.getRootKey()}`)
44+
core.debug(e)
45+
}
3846
}
3947

4048
private async saveImageAsUnpacked() {

0 commit comments

Comments
 (0)