mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Create the .complete file so tc.find() can find it for future runs for self-hosted runners
This commit is contained in:
+6
-2
@@ -53,13 +53,13 @@ export async function install(platform, engine, version) {
|
||||
common.setupPath([`${rubyPrefix}\\bin`, ...toolchainPaths])
|
||||
|
||||
if (!inToolCache) {
|
||||
await downloadAndExtract(url, base, rubyPrefix);
|
||||
await downloadAndExtract(engine, version, url, base, rubyPrefix);
|
||||
}
|
||||
|
||||
return rubyPrefix
|
||||
}
|
||||
|
||||
async function downloadAndExtract(url, base, rubyPrefix) {
|
||||
async function downloadAndExtract(engine, version, url, base, rubyPrefix) {
|
||||
const parentDir = path.dirname(rubyPrefix)
|
||||
|
||||
const downloadPath = await common.measure('Downloading Ruby', async () => {
|
||||
@@ -73,6 +73,10 @@ async function downloadAndExtract(url, base, rubyPrefix) {
|
||||
if (base !== path.basename(rubyPrefix)) {
|
||||
await io.mv(path.join(parentDir, base), rubyPrefix)
|
||||
}
|
||||
|
||||
if (common.shouldUseToolCache(engine, version)) {
|
||||
common.createToolCacheCompleteFile(rubyPrefix)
|
||||
}
|
||||
}
|
||||
|
||||
async function setupMingw(version) {
|
||||
|
||||
Reference in New Issue
Block a user