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.
This commit is contained in:
Jimver
2024-04-20 21:00:24 +02:00
committed by Jim
parent 386cdbd67d
commit 206bd0fe38
+3 -1
View File
@@ -96,7 +96,9 @@ export async function download(
core.debug(`Tool was moved to cache directory ${cacheDirectory}`) core.debug(`Tool was moved to cache directory ${cacheDirectory}`)
executableDirectory = cacheDirectory executableDirectory = cacheDirectory
} }
executableDirectory = downloadDirectory if (executableDirectory === undefined) {
executableDirectory = downloadDirectory
}
} }
core.debug(`Executable path ${executableDirectory}`) core.debug(`Executable path ${executableDirectory}`)
// String with full executable path // String with full executable path