Use tc.find() with the effective tool cache path

* So it finds already-download prebuilt Ruby in the GH-hosted tool cache path
  on self-hosted, where $RUNNER_TOOL_CACHE is often different than on GH-hosted.
* See #475.
* This relies on tc.find() looking up the env var every time:
  https://github.com/actions/toolkit/blob/1f4b3fac06/packages/tool-cache/src/tool-cache.ts#L522
This commit is contained in:
Benoit Daloze
2023-03-05 14:56:02 +01:00
parent d03a71de6e
commit 59b5745c73
4 changed files with 30 additions and 6 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ export async function install(platform, engine, version) {
let rubyPrefix, inToolCache
if (common.shouldUseToolCache(engine, version)) {
inToolCache = tc.find(common.engineToToolCacheName(engine), version)
inToolCache = common.toolCacheFind(engine, version)
if (inToolCache) {
rubyPrefix = inToolCache
} else {