Skip to content

Commit c34fe21

Browse files
authored
Install specific bundler version when minor and patch versions are given (#139)
1 parent 324b8ce commit c34fe21

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ async function installBundler(bundlerVersionInput, lockFile, platform, rubyPrefi
229229
console.log(`Using Bundler 1 shipped with ${engine}`)
230230
} else {
231231
const gem = path.join(rubyPrefix, 'bin', 'gem')
232-
await exec.exec(gem, ['install', 'bundler', '-v', `~> ${bundlerVersion}`, '--no-document'])
232+
const bundlerVersionConstraint = bundlerVersion.match(/^\d+\.\d+\.\d+/) ? bundlerVersion : `~> ${bundlerVersion}`
233+
await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint, '--no-document'])
233234
}
234235

235236
return bundlerVersion

0 commit comments

Comments
 (0)