Use the default tool cache path on self-hosted runners matching a GH-hosted runner image

* See https://github.com/ruby/setup-ruby/issues/475
* Semantically reverts 377a94bc68
This commit is contained in:
Benoit Daloze
2023-03-05 14:56:02 +01:00
parent 5a73aa9f67
commit ddde3938f5
3 changed files with 31 additions and 22 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export async function install(platform, engine, version) {
if (common.isSelfHostedRunner()) {
const rubyBuildDefinition = engine === 'ruby' ? version : `${engine}-${version}`
core.error(
`The current runner (${common.getOSNameVersionArch()}, RUNNER_TOOL_CACHE=${common.getRunnerToolCache()}) was detected as self-hosted because ${common.selfHostedRunnerReason()}.\n` +
`The current runner (${common.getOSNameVersionArch()}) was detected as self-hosted because ${common.selfHostedRunnerReason()}.\n` +
`In such a case, you should install Ruby in the $RUNNER_TOOL_CACHE yourself, for example using https://github.com/rbenv/ruby-build\n` +
`You can take inspiration from this workflow for more details: https://github.com/ruby/ruby-builder/blob/master/.github/workflows/build.yml\n` +
`$ ruby-build ${rubyBuildDefinition} ${toolCacheRubyPrefix}\n` +