Fix tc.find() calls to use the proper name on self-hosted

This commit is contained in:
Benoit Daloze
2023-03-05 14:56:02 +01:00
parent ddde3938f5
commit d03a71de6e
4 changed files with 19 additions and 12 deletions
+7 -4
View File
@@ -264,15 +264,18 @@ function getDefaultToolCachePath() {
}
}
export function getToolCacheRubyPrefix(platform, engine, version) {
const toolCache = getToolCachePath()
const name = {
export function engineToToolCacheName(engine) {
return {
ruby: 'Ruby',
jruby: 'JRuby',
truffleruby: 'TruffleRuby',
"truffleruby+graalvm": 'TruffleRubyGraalVM'
}[engine]
return path.join(toolCache, name, version, os.arch())
}
export function getToolCacheRubyPrefix(platform, engine, version) {
const toolCache = getToolCachePath()
return path.join(toolCache, engineToToolCacheName(engine), version, os.arch())
}
export function toolCacheCompleteFile(toolCacheRubyPrefix) {