Skip to content

Commit fabf251

Browse files
committed
Allow bundler: none + bundle-cache: true to use the Bundler shipped with that Ruby + the cache
1 parent 51c0d59 commit fabf251

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

dist/index.js

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,17 @@ export async function setupRuby(options = {}) {
7878
await inputs['afterSetupPathHook']({ platform, rubyPrefix, engine, version })
7979
}
8080

81-
if (inputs['bundler'] !== 'none') {
82-
const [gemfile, lockFile] = bundler.detectGemfiles()
81+
const [gemfile, lockFile] = bundler.detectGemfiles()
82+
let bundlerVersion = "unknown"
8383

84-
const bundlerVersion = await common.measure('Installing Bundler', async () =>
84+
if (inputs['bundler'] !== 'none') {
85+
bundlerVersion = await common.measure('Installing Bundler', async () =>
8586
bundler.installBundler(inputs['bundler'], lockFile, platform, rubyPrefix, engine, version))
87+
}
8688

87-
if (inputs['bundler-cache'] === 'true') {
88-
await common.measure('bundle install', async () =>
89-
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version']))
90-
}
89+
if (inputs['bundler-cache'] === 'true') {
90+
await common.measure('bundle install', async () =>
91+
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version']))
9192
}
9293

9394
core.setOutput('ruby-prefix', rubyPrefix)

0 commit comments

Comments
 (0)