diff --git a/dist/index.js b/dist/index.js index 33ffdcf..8ca2d66 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59590,16 +59590,17 @@ async function setupRuby(options = {}) { await inputs['afterSetupPathHook']({ platform, rubyPrefix, engine, version }) } + const [gemfile, lockFile] = bundler.detectGemfiles() + let bundlerVersion = "unknown" + if (inputs['bundler'] !== 'none') { - const [gemfile, lockFile] = bundler.detectGemfiles() - - const bundlerVersion = await common.measure('Installing Bundler', async () => + bundlerVersion = await common.measure('Installing Bundler', async () => bundler.installBundler(inputs['bundler'], lockFile, platform, rubyPrefix, engine, version)) + } - if (inputs['bundler-cache'] === 'true') { - await common.measure('bundle install', async () => - bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - } + if (inputs['bundler-cache'] === 'true') { + await common.measure('bundle install', async () => + bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) } core.setOutput('ruby-prefix', rubyPrefix) diff --git a/index.js b/index.js index b41f574..73184cb 100644 --- a/index.js +++ b/index.js @@ -78,16 +78,17 @@ export async function setupRuby(options = {}) { await inputs['afterSetupPathHook']({ platform, rubyPrefix, engine, version }) } + const [gemfile, lockFile] = bundler.detectGemfiles() + let bundlerVersion = "unknown" + if (inputs['bundler'] !== 'none') { - const [gemfile, lockFile] = bundler.detectGemfiles() - - const bundlerVersion = await common.measure('Installing Bundler', async () => + bundlerVersion = await common.measure('Installing Bundler', async () => bundler.installBundler(inputs['bundler'], lockFile, platform, rubyPrefix, engine, version)) + } - if (inputs['bundler-cache'] === 'true') { - await common.measure('bundle install', async () => - bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) - } + if (inputs['bundler-cache'] === 'true') { + await common.measure('bundle install', async () => + bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) } core.setOutput('ruby-prefix', rubyPrefix)