mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Fix tc.find() calls to use the proper name on self-hosted
This commit is contained in:
@@ -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) {
|
||||
|
||||
+10
-6
@@ -289,6 +289,7 @@ __nccwpck_require__.r(__webpack_exports__);
|
||||
__nccwpck_require__.d(__webpack_exports__, {
|
||||
"createToolCacheCompleteFile": () => (/* binding */ createToolCacheCompleteFile),
|
||||
"drive": () => (/* binding */ drive),
|
||||
"engineToToolCacheName": () => (/* binding */ engineToToolCacheName),
|
||||
"floatVersion": () => (/* binding */ floatVersion),
|
||||
"getOSNameVersionArch": () => (/* binding */ getOSNameVersionArch),
|
||||
"getRunnerToolCache": () => (/* binding */ getRunnerToolCache),
|
||||
@@ -620,15 +621,18 @@ function getDefaultToolCachePath() {
|
||||
}
|
||||
}
|
||||
|
||||
function getToolCacheRubyPrefix(platform, engine, version) {
|
||||
const toolCache = getToolCachePath()
|
||||
const name = {
|
||||
function engineToToolCacheName(engine) {
|
||||
return {
|
||||
ruby: 'Ruby',
|
||||
jruby: 'JRuby',
|
||||
truffleruby: 'TruffleRuby',
|
||||
"truffleruby+graalvm": 'TruffleRubyGraalVM'
|
||||
}[engine]
|
||||
return path.join(toolCache, name, version, os.arch())
|
||||
}
|
||||
|
||||
function getToolCacheRubyPrefix(platform, engine, version) {
|
||||
const toolCache = getToolCachePath()
|
||||
return path.join(toolCache, engineToToolCacheName(engine), version, os.arch())
|
||||
}
|
||||
|
||||
function toolCacheCompleteFile(toolCacheRubyPrefix) {
|
||||
@@ -68280,7 +68284,7 @@ function getAvailableVersions(platform, engine) {
|
||||
async function install(platform, engine, version) {
|
||||
let rubyPrefix, inToolCache
|
||||
if (common.shouldUseToolCache(engine, version)) {
|
||||
inToolCache = tc.find('Ruby', version)
|
||||
inToolCache = tc.find(common.engineToToolCacheName(engine), version)
|
||||
if (inToolCache) {
|
||||
rubyPrefix = inToolCache
|
||||
} else {
|
||||
@@ -68494,7 +68498,7 @@ async function install(platform, engine, version) {
|
||||
|
||||
let rubyPrefix, inToolCache
|
||||
if (common.shouldUseToolCache(engine, version)) {
|
||||
inToolCache = tc.find('Ruby', version)
|
||||
inToolCache = tc.find(common.engineToToolCacheName(engine), version)
|
||||
if (inToolCache) {
|
||||
rubyPrefix = inToolCache
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ export function getAvailableVersions(platform, engine) {
|
||||
export async function install(platform, engine, version) {
|
||||
let rubyPrefix, inToolCache
|
||||
if (common.shouldUseToolCache(engine, version)) {
|
||||
inToolCache = tc.find('Ruby', version)
|
||||
inToolCache = tc.find(common.engineToToolCacheName(engine), version)
|
||||
if (inToolCache) {
|
||||
rubyPrefix = inToolCache
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ export async function install(platform, engine, version) {
|
||||
|
||||
let rubyPrefix, inToolCache
|
||||
if (common.shouldUseToolCache(engine, version)) {
|
||||
inToolCache = tc.find('Ruby', version)
|
||||
inToolCache = tc.find(common.engineToToolCacheName(engine), version)
|
||||
if (inToolCache) {
|
||||
rubyPrefix = inToolCache
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user