Unverified Commit e63ddf9c authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Avoid warning for cache reservation errors

We have no way of knowing if another build has already cached these
artifacts, so CacheReservationError is expected.
parent d5cd9d86
Loading
Loading
Loading
Loading
+5 −2
Changes for src/cache-gradle-user-home.ts: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -135,10 +135,13 @@ export class GradleUserHomeCache extends AbstractCache {
                    !(error instanceof Error)
                ) {
                    throw error
                }
                // TODO : Avoid warning for reserve cache error: this is expected
                } else if (error instanceof cache.ReserveCacheError) {
                    // These are expected if the artifact is already cached
                    this.debug(error.message)
                } else {
                    core.warning(error.message)
                }
            }

            // Write the marker file that will stand in place of the original
            fs.writeFileSync(markerFile, 'cached')