From 4cb86e9712c5b844c493382d94e6412b0580cc9d Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Mon, 20 Jun 2022 20:17:36 -0600 Subject: [PATCH] Report when cache not available --- src/cache-reporting.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cache-reporting.ts b/src/cache-reporting.ts index 57c46f6..b5ec2ab 100644 --- a/src/cache-reporting.ts +++ b/src/cache-reporting.ts @@ -1,4 +1,5 @@ import * as core from '@actions/core' +import * as cache from '@actions/cache' /** * Collects information on what entries were saved and restored during the action. @@ -15,6 +16,7 @@ export class CacheListener { } get cacheStatus(): string { + if (!cache.isFeatureAvailable()) return 'not available' if (this.isCacheDisabled) return 'disabled' if (this.isCacheWriteOnly) return 'write-only' if (this.isCacheReadOnly) return 'read-only'