From 701e197d390492e8185cf44916bdb18c6217c645 Mon Sep 17 00:00:00 2001 From: k Date: Tue, 31 Mar 2026 13:30:43 +0200 Subject: [PATCH] Do not cache downloads for 'latest' --- dist/index.js | 4 ++++ src/asset.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/dist/index.js b/dist/index.js index 7961b2f..50c484d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -89,6 +89,10 @@ class Asset { this.env = env; } async setup() { + // Do not cache "latest" + if (this.version === 'latest') { + return this.download(); + } const toolPath = tool_cache.find(this.name, this.version); if (toolPath) { return toolPath; diff --git a/src/asset.ts b/src/asset.ts index 30be32f..851202c 100644 --- a/src/asset.ts +++ b/src/asset.ts @@ -19,6 +19,11 @@ abstract class Asset { constructor(readonly name: string, readonly version: string, protected readonly env: Env) {} async setup() { + // Do not cache "latest" + if (this.version === 'latest') { + return this.download(); + } + const toolPath = tc.find(this.name, this.version); if (toolPath) { return toolPath;