Add support for JRuby on Windows

This commit is contained in:
Benoit Daloze
2020-01-19 22:56:19 +01:00
parent 0f26fedc26
commit dbac26120b
5 changed files with 16 additions and 14 deletions
+3 -2
View File
@@ -5,14 +5,15 @@ const core = require('@actions/core')
async function run() {
try {
const platform = getVirtualEnvironmentName()
const [engine, version] = parseRubyEngineAndVersion(core.getInput('ruby-version'))
let installer
if (platform === 'windows-latest') {
if (platform === 'windows-latest' && engine !== 'jruby') {
installer = require('./windows')
} else {
installer = require('./ruby-install-builder')
}
const [engine, version] = parseRubyEngineAndVersion(core.getInput('ruby-version'))
const engineVersions = await installer.getAvailableVersions(engine)
const ruby = validateRubyEngineAndVersion(platform, engineVersions, engine, version)