From cc605938452e0b119faffb2fed09bc5aee497779 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Thu, 25 Aug 2022 19:20:08 -0600 Subject: [PATCH] Disable cache-cleanup on Windows It does not seem possible to use `find .. -exec ..` on Windows, so a node-only solution may be required. --- .github/workflows/integ-test-cache-cleanup.yml | 2 +- src/cache-utils.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integ-test-cache-cleanup.yml b/.github/workflows/integ-test-cache-cleanup.yml index 2b9d691..b98e492 100644 --- a/.github/workflows/integ-test-cache-cleanup.yml +++ b/.github/workflows/integ-test-cache-cleanup.yml @@ -7,7 +7,7 @@ on: type: string runner-os: type: string - default: '["ubuntu-latest", "windows-latest", "macos-latest"]' + default: '["ubuntu-latest", "macos-latest"]' # Windows is not yet supported download-dist: type: boolean default: false diff --git a/src/cache-utils.ts b/src/cache-utils.ts index 6a0434f..7462f0c 100644 --- a/src/cache-utils.ts +++ b/src/cache-utils.ts @@ -48,7 +48,14 @@ export function isCacheDebuggingEnabled(): boolean { } export function isCacheCleanupEnabled(): boolean { - return core.getBooleanInput(CACHE_CLEANUP_ENABLED_PARAMETER) + const userEnabled = core.getBooleanInput(CACHE_CLEANUP_ENABLED_PARAMETER) + + if (userEnabled && process.platform === 'win32') { + core.warning('Cache cleanup is not yet supported on Windows') + return false + } + + return userEnabled } /**