Skip to content

Commit

Permalink
Do not validate the version for self-hosted
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed May 30, 2024
1 parent 049eae0 commit d4138eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,14 @@ export async function setupRuby(options = {}) {
installer = require('./ruby-builder')
}

const engineVersions = installer.getAvailableVersions(platform, engine)
const version = validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVersion)
let version
if (common.isSelfHostedRunner()) {
// The list of available Rubies in the hostedtoolcache is unrelated to getAvailableVersions()
version = parsedVersion
} else {
const engineVersions = installer.getAvailableVersions(platform, engine)
version = validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVersion)
}

createGemRC(engine, version)
envPreInstall()
Expand Down

0 comments on commit d4138eb

Please sign in to comment.