From 206bd0fe38a9f96f95ba83e401f9d6046649e095 Mon Sep 17 00:00:00 2001 From: Jimver Date: Sat, 20 Apr 2024 20:46:48 +0200 Subject: [PATCH] Only set executable directory to downloadDirectory if undefined There is a bug where we cannot find the installer when using a cache, this is because I set the executableDirectory to downloadDirectory always, which is not correct since I moved the installer to the github cache directory. --- src/downloader.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/downloader.ts b/src/downloader.ts index 413e542..8ebfcda 100644 --- a/src/downloader.ts +++ b/src/downloader.ts @@ -96,7 +96,9 @@ export async function download( core.debug(`Tool was moved to cache directory ${cacheDirectory}`) executableDirectory = cacheDirectory } - executableDirectory = downloadDirectory + if (executableDirectory === undefined) { + executableDirectory = downloadDirectory + } } core.debug(`Executable path ${executableDirectory}`) // String with full executable path